Move #expect from global namespace to example DSL

This commit is contained in:
Michael Miller 2018-09-15 11:30:45 -06:00
parent 967797428c
commit 1ea06998e7
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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