module RSpec::ChangeToNow::Matchers::DSL

Public Instance Methods

as_matcher(expected) click to toggle source

@api public Returns a matcher that behaves like the matcher if passed a matcher, otherwise like match(matcher)

# File lib/rspec/change_to_now/matchers/dsl.rb, line 16
def as_matcher(expected)
  RSpec::ChangeToNow::Matchers::AsMatcher.new(expected)
end
matcher_only(matcher) click to toggle source

@api public Returns a new matcher that fails with a syntax error if matcher is not a matcher but otherwise behaves just like matcher.

# File lib/rspec/change_to_now/matchers/dsl.rb, line 4
def matcher_only(matcher)
  RSpec::ChangeToNow::Matchers::MatcherOnly.new(matcher)
end
negate(matcher) click to toggle source

@api public Returns a matcher that behaves like the inverse of matcher.

# File lib/rspec/change_to_now/matchers/dsl.rb, line 10
def negate(matcher)
  RSpec::ChangeToNow::Matchers::Negate.new(matcher)
end