mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Move #expect from global namespace to example DSL
This commit is contained in:
parent
967797428c
commit
1ea06998e7
2 changed files with 4 additions and 4 deletions
|
@ -4,6 +4,10 @@ module Spectator
|
||||||
macro is_expected
|
macro is_expected
|
||||||
expect(subject)
|
expect(subject)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def expect(actual : T) forall T
|
||||||
|
::Spectator::Expectation.new(actual)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,9 +1,5 @@
|
||||||
require "./matchers/matcher"
|
require "./matchers/matcher"
|
||||||
|
|
||||||
def expect(actual : T) forall T
|
|
||||||
Spectator::Expectation.new(actual)
|
|
||||||
end
|
|
||||||
|
|
||||||
module Spectator
|
module Spectator
|
||||||
class Expectation(T)
|
class Expectation(T)
|
||||||
getter actual : T
|
getter actual : T
|
||||||
|
|
Loading…
Reference in a new issue