]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/spec/spec/matchers/mock_constraint_matchers_spec.rb
Show whether a trace is public or private in the trace list, so that a user can easil...
[rails.git] / vendor / gems / rspec-1.1.2 / spec / spec / matchers / mock_constraint_matchers_spec.rb
1 require File.dirname(__FILE__) + '/../../spec_helper.rb'
2
3 describe "The anything() mock argument constraint matcher" do
4   specify { anything.should == Object.new }
5   specify { anything.should == Class }
6   specify { anything.should == 1 }
7   specify { anything.should == "a string" }
8   specify { anything.should == :a_symbol }
9 end
10
11 describe "The boolean() mock argument constraint matcher" do
12   specify { boolean.should == true }
13   specify { boolean.should == false }
14   specify { boolean.should_not == Object.new }
15   specify { boolean.should_not == Class }
16   specify { boolean.should_not == 1 }
17   specify { boolean.should_not == "a string" }
18   specify { boolean.should_not == :a_symbol }
19 end
20
21 describe "The an_instance_of() mock argument constraint matcher" do
22   # NOTE - this is implemented as a predicate_matcher - see example_group_methods.rb
23   specify { an_instance_of(String).should == "string"  }
24 end