@api private Used to specify a change to a specific value (and, optionally, from a specific value).
# File lib/rspec/matchers/built_in/change.rb, line 270 def initialize(change_details, expected_after) @description_suffix = nil super(change_details, MATCH_ANYTHING, expected_after) end
@private
# File lib/rspec/matchers/built_in/change.rb, line 284 def does_not_match?(event_proc) raise NotImplementedError, "`expect { }.not_to change { }.to()` is not supported" end
@api public Specifies the original value.
# File lib/rspec/matchers/built_in/change.rb, line 277 def from(value) @expected_before = value @description_suffix = " from #{description_of value}" self end
# File lib/rspec/matchers/built_in/change.rb, line 290 def change_description "to #{description_of @expected_after}#{@description_suffix}" end