class RSpec::Matchers::BuiltIn::ChangeToValue
(and, optionally, from a specific value).
Used to specify a change to a specific value
@api private
def change_description
def change_description "to #{description_of @expected_after}#{@description_suffix}" end
def does_not_match?(_event_proc)
- Private: -
def does_not_match?(_event_proc) raise NotImplementedError, "`expect { }.not_to change { }.to()` " \ "is not supported" end
def from(value)
- Api: - public
def from(value) @expected_before = value @description_suffix = " from #{description_of value}" self end
def initialize(change_details, expected_after)
def initialize(change_details, expected_after) @description_suffix = nil super(change_details, MATCH_ANYTHING, expected_after) end