mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
DSL fully added back in
This commit is contained in:
parent
d43d309a47
commit
73985772b7
3 changed files with 150 additions and 156 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue