Library providing tools for writing and running RSpec tests.
Matcher for testing the change in a value.
DEFAULT_EXPECTED_ITEMS
= Object.new
#initialize => HaveChangedMatcher
#actual => Object (readonly)
#by(difference) => HaveChangedMatcher
Creates an difference expectation between the initial and current values. The matcher will subtract the current value from the initial value and compare the result with the specified value.
#description => Object
#does_not_match?(actual) => Boolean
Inverse of #matches? method.
#failure_message => Object
Message for when the object does not match, but was expected to. Make sure to always call #matches? first to set up the matcher state.
#failure_message_when_negated => Object
Message for when the object matches, but was expected not to. Make sure to always call #matches? first to set up the matcher state.
#from(value) => HaveChangedMatcher
Creates an expectation on the initial value. The matcher will compare the initial value from the value spy with the specified value.
#matches?(actual) => Boolean
Checks if the observed value has changed.
#to(value) => HaveChangedMatcher
Creates an expectation on the current value. The matcher will compare the current value from the value spy with the specified value.
Back to Documentation | Versions | 2.8 | Reference | RSpec | RSpec::SleepingKingStudios | RSpec::SleepingKingStudios::Matchers | RSpec::SleepingKingStudios::Matchers::Core