Class: Bogus::Interaction::ArgumentComparator
- Inherits:
-
Object
- Object
- Bogus::Interaction::ArgumentComparator
- Defined in:
- lib/bogus/stubbing/interaction.rb
Instance Attribute Summary collapse
-
#recorded ⇒ Object
readonly
Returns the value of attribute recorded.
-
#stubbed ⇒ Object
readonly
Returns the value of attribute stubbed.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ ArgumentComparator
constructor
A new instance of ArgumentComparator.
- #same? ⇒ Boolean
Constructor Details
#initialize(opts = {}) ⇒ ArgumentComparator
Returns a new instance of ArgumentComparator.
56 57 58 59 |
# File 'lib/bogus/stubbing/interaction.rb', line 56 def initialize(opts = {}) @recorded = opts.fetch(:recorded) @stubbed = opts.fetch(:stubbed) end |
Instance Attribute Details
#recorded ⇒ Object (readonly)
Returns the value of attribute recorded.
54 55 56 |
# File 'lib/bogus/stubbing/interaction.rb', line 54 def recorded @recorded end |
#stubbed ⇒ Object (readonly)
Returns the value of attribute stubbed.
54 55 56 |
# File 'lib/bogus/stubbing/interaction.rb', line 54 def stubbed @stubbed end |
Instance Method Details
#same? ⇒ Boolean
61 62 63 64 65 |
# File 'lib/bogus/stubbing/interaction.rb', line 61 def same? return true if with_matcher_args? stubbed == recorded_without_defaults end |