Class: Matchers::BuiltIn::ChangeFromValue

Inherits:
Object
  • Object
show all
Includes:
RSpec::ChangeToNow::Matchers::DSL
Defined in:
lib/rspec/change_to_now.rb

Instance Method Summary collapse

Methods included from RSpec::ChangeToNow::Matchers::DSL

#as_matcher, #matcher_only, #negate

Methods included from RSpec::ChangeToNow::Matchers::DSL::Detect

#detect

Instance Method Details

#not_to_now(matcher) ⇒ Object



83
84
85
86
87
88
# File 'lib/rspec/change_to_now.rb', line 83

def not_to_now(matcher)
  RSpec::Matchers::BuiltIn::ChangeToValue.new(
    @change_details,
    negate(matcher_only(matcher))
  ).from(@expected_before)
end

#to_now(matcher) ⇒ Object



76
77
78
79
80
81
# File 'lib/rspec/change_to_now.rb', line 76

def to_now(matcher)
  RSpec::Matchers::BuiltIn::ChangeToValue.new(
    @change_details,
    matcher_only(matcher)
  ).from(@expected_before)
end

#with_final_result(expected) ⇒ Object



90
91
92
# File 'lib/rspec/change_to_now.rb', line 90

def with_final_result(expected)
  to_without_to_now(expected)
end