btakita (author)
Sat May 24 11:10:09 -0700 2008
commit  7ac763592449ef25d8ac2e1dfe6dafa45bf8f86d
tree    ad465d7e267aa2116fa26c8dbe6452797cedcf31
parent  567ed91cc04ac181da712c4d3b00c8f056d9e4e3
pain-point / vendor / plugins / rspec / lib / spec / mocks / argument_constraint_matchers.rb
100644 32 lines (25 sloc) 0.616 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
module Spec
  module Mocks
    module ArgumentConstraintMatchers
      
      # Shortcut for creating an instance of Spec::Mocks::DuckTypeArgConstraint
      def duck_type(*args)
        DuckTypeArgConstraint.new(*args)
      end
 
      def any_args
        AnyArgsConstraint.new
      end
      
      def anything
        AnyArgConstraint.new(nil)
      end
      
      def boolean
        BooleanArgConstraint.new(nil)
      end
      
      def hash_including(expected={})
        HashIncludingConstraint.new(expected)
      end
      
      def no_args
        NoArgsConstraint.new
      end
    end
  end
end