class RSpec::Matchers::BuiltIn::SpecificValuesChange
@api private Base class for specifying a change from and/or to specific values.
Constants
- MATCH_ANYTHING
-
@private
Public Class Methods
# File rspec-expectations/lib/rspec/matchers/built_in/change.rb, line 184 def initialize(change_details, from, to) @change_details = change_details @expected_before = from @expected_after = to end
Public Instance Methods
@private
# File rspec-expectations/lib/rspec/matchers/built_in/change.rb, line 196 def description "change #{@change_details.value_representation} #{change_description}" end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/change.rb, line 201 def failure_message return before_value_failure unless @matches_before return did_not_change_failure unless @change_details.changed? after_value_failure end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/change.rb, line 191 def matches?(event_proc) perform_change(event_proc) && @change_details.changed? && @matches_before && matches_after? end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/change.rb, line 208 def supports_block_expectations? true end
@private
# File rspec-expectations/lib/rspec/matchers/built_in/change.rb, line 213 def supports_value_expectations? false end