module RSpec::Matchers
Public Instance Methods
before_and_after(before_proc, after_proc)
click to toggle source
Applied to a proc, specifies that its execution will cause some value to change.
Allows you to run a pair of related checks — one before the change and one after the change. The checks can be any arbitrary RSpec
expectations.
@param [Proc] before_proc The expectation to check before making the change. @param [Proc] after_proc The expectation to check after making the change.
# File lib/rspec/matchers/before_and_after.rb, line 12 def before_and_after(before_proc, after_proc) BeforeAndAfter.new(before_proc, after_proc) end