DSL fully added back in

This commit is contained in:
Michael Miller 2021-01-30 16:43:13 -07:00
parent d43d309a47
commit 73985772b7
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD
3 changed files with 150 additions and 156 deletions

View file

@ -1,13 +1,4 @@
# require "./dsl/*"
require "./dsl/builder"
require "./dsl/examples"
require "./dsl/expectations"
require "./dsl/groups"
require "./dsl/hooks"
require "./dsl/matchers"
require "./dsl/tags"
require "./dsl/top"
require "./dsl/values"
require "./dsl/*"
module Spectator
# Namespace containing methods representing the spec domain specific language.

View file

@ -1,6 +1,7 @@
require "../mocks"
module Spectator::DSL
module Mocks
macro double(name = "Anonymous", **stubs, &block)
{% if name.is_a?(StringLiteral) || name.is_a?(StringInterpolation) %}
anonymous_double({{name}}, {{stubs.double_splat}})
@ -171,3 +172,4 @@ module Spectator::DSL
%stubs
end
end
end

View file

@ -13,6 +13,7 @@ class SpectatorTestContext < SpectatorContext
include ::Spectator::DSL::Groups
include ::Spectator::DSL::Hooks
include ::Spectator::DSL::Matchers
include ::Spectator::DSL::Mocks
include ::Spectator::DSL::Values
@subject = ::Spectator::LazyWrapper.new