RSpec

Library providing tools for writing and running RSpec tests.

Class: RSpec::SleepingKingStudios::Matchers::Core::HaveChangedMatcher

Parent Namespace
RSpec::SleepingKingStudios::Matchers::Core
Inherited Classes
RSpec::SleepingKingStudios::Matchers::BaseMatcher > Object
Included Modules
RSpec::Matchers::Composable
Defined In
lib/rspec/sleeping_king_studios/matchers/core/have_changed_matcher.rb

Table Of Contents

Overview

Matcher for testing the change in a value.

Since

Back To Top

Constants

DEFAULT_EXPECTED_ITEMS

= Object.new

Inherited From
RSpec::SleepingKingStudios::Matchers::Description

Since

Back To Top

Constructor

#initialize => HaveChangedMatcher

Returns

Since

Back To Top

Instance Attributes

#actual => Object (readonly)

Inherited From
RSpec::SleepingKingStudios::Matchers::BaseMatcher

Since

Back To Top

Instance Methods

#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.

Parameters

Returns

Since

#description => Object

Since

#does_not_match?(actual) => Boolean

Inverse of #matches? method.

Parameters

Returns

See Also

Since

#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.

Since

#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.

Since

#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.

Parameters

Returns

Since

#matches?(actual) => Boolean

Checks if the observed value has changed.

Parameters

Returns

Raises

Since

#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.

Parameters

Returns

Since

Back To Top


Back to Documentation | Versions | 2.8.1 | Reference | RSpec | RSpec::SleepingKingStudios | RSpec::SleepingKingStudios::Matchers | RSpec::SleepingKingStudios::Matchers::Core