Module: Spec::Mocks::ArgumentConstraintMatchers

Included in:
SpecMethods
Defined in:
lib/spec/mocks/argument_constraint_matchers.rb

Instance Method Summary collapse

Instance Method Details

#any_argsObject



10
11
12
# File 'lib/spec/mocks/argument_constraint_matchers.rb', line 10

def any_args
  AnyArgsConstraint.new
end

#anythingObject



14
15
16
# File 'lib/spec/mocks/argument_constraint_matchers.rb', line 14

def anything
  AnyArgConstraint.new(nil)
end

#booleanObject



18
19
20
# File 'lib/spec/mocks/argument_constraint_matchers.rb', line 18

def boolean
  BooleanArgConstraint.new(nil)
end

#duck_type(*args) ⇒ Object

Shortcut for creating an instance of Spec::Mocks::DuckTypeArgConstraint



6
7
8
# File 'lib/spec/mocks/argument_constraint_matchers.rb', line 6

def duck_type(*args)
  DuckTypeArgConstraint.new(*args)
end

#no_argsObject



22
23
24
# File 'lib/spec/mocks/argument_constraint_matchers.rb', line 22

def no_args
  NoArgsConstraint.new
end