Updated to latest rspec
[gitorious:georgyos-clone.git] / vendor / plugins / rspec / lib / spec / mocks / argument_constraint_matchers.rb
1 module Spec
2   module Mocks
3     module ArgumentConstraintMatchers
4       
5       # Shortcut for creating an instance of Spec::Mocks::DuckTypeArgConstraint
6       def duck_type(*args)
7         DuckTypeArgConstraint.new(*args)
8       end
9
10       def any_args
11         AnyArgsConstraint.new
12       end
13       
14       def anything
15         AnyArgConstraint.new(nil)
16       end
17       
18       def boolean
19         BooleanArgConstraint.new(nil)
20       end
21       
22       def hash_including(expected={})
23         HashIncludingConstraint.new(expected)
24       end
25       
26       def no_args
27         NoArgsConstraint.new
28       end
29     end
30   end
31 end