Class: Spec::Mocks::AnyOrderArgConstraint

Inherits:
Object
  • Object
show all
Defined in:
lib/not_a_mock/argument_constraint_extensions.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ AnyOrderArgConstraint

Returns a new instance of AnyOrderArgConstraint.



6
7
8
# File 'lib/not_a_mock/argument_constraint_extensions.rb', line 6

def initialize(array)
  @array = array
end

Instance Method Details

#==(arg) ⇒ Object



10
11
12
# File 'lib/not_a_mock/argument_constraint_extensions.rb', line 10

def ==(arg)
  Set.new(@array) == Set.new(arg)
end

#inspectObject



14
15
16
# File 'lib/not_a_mock/argument_constraint_extensions.rb', line 14

def inspect
  "in_any_order(#{@array.inspect})"
end