lib/matchi/change.rb in matchi-3.1.0 vs lib/matchi/change.rb in matchi-3.1.1
- old
+ new
@@ -33,15 +33,15 @@
# object = []
#
# change_wrapper = Matchi::Change.new(object, :length)
# change_wrapper.by_at_least(1)
#
- # @param expected [#object_id] The minimum delta of the expected change.
+ # @param minimum_delta [#object_id] The minimum delta of the expected change.
#
# @return [#matches?] A *change by at least* matcher.
- def by_at_least(expected)
- ByAtLeast.new(expected, &@state)
+ def by_at_least(minimum_delta)
+ ByAtLeast.new(minimum_delta, &@state)
end
# Specifies a maximum delta of the expected change.
#
# @example
@@ -50,15 +50,15 @@
# object = []
#
# change_wrapper = Matchi::Change.new(object, :length)
# change_wrapper.by_at_most(1)
#
- # @param expected [#object_id] The maximum delta of the expected change.
+ # @param maximum_delta [#object_id] The maximum delta of the expected change.
#
# @return [#matches?] A *change by at most* matcher.
- def by_at_most(expected)
- ByAtMost.new(expected, &@state)
+ def by_at_most(maximum_delta)
+ ByAtMost.new(maximum_delta, &@state)
end
# Specifies the delta of the expected change.
#
# @example
@@ -67,43 +67,43 @@
# object = []
#
# change_wrapper = Matchi::Change.new(object, :length)
# change_wrapper.by(1)
#
- # @param expected [#object_id] The delta of the expected change.
+ # @param delta [#object_id] The delta of the expected change.
#
# @return [#matches?] A *change by* matcher.
- def by(expected)
- By.new(expected, &@state)
+ def by(delta)
+ By.new(delta, &@state)
end
# Specifies the original value.
#
# @example
# require "matchi/change"
#
# change_wrapper = Matchi::Change.new("foo", :to_s)
# change_wrapper.from("foo")
#
- # @param expected [#object_id] The original value.
+ # @param old_value [#object_id] The original value.
#
# @return [#matches?] A *change from* wrapper.
- def from(expected)
- From.new(expected, &@state)
+ def from(old_value)
+ From.new(old_value, &@state)
end
# Specifies the new value to expect.
#
# @example
# require "matchi/change"
#
# change_wrapper = Matchi::Change.new("foo", :to_s)
# change_wrapper.to("FOO")
#
- # @param expected [#object_id] The new value to expect.
+ # @param new_value [#object_id] The new value to expect.
#
# @return [#matches?] A *change to* matcher.
- def to(expected)
- To.new(expected, &@state)
+ def to(new_value)
+ To.new(new_value, &@state)
end
end
end