Class: Bogus::Interaction::ArgumentComparator

Inherits:
Object
  • Object
show all
Defined in:
lib/bogus/stubbing/interaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#recordedObject (readonly)

Returns the value of attribute recorded.



54
55
56
# File 'lib/bogus/stubbing/interaction.rb', line 54

def recorded
  @recorded
end

#stubbedObject (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

Returns:

  • (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