Upgraded Rails and RSpec
[monkeycharger.git] / vendor / plugins / rspec / spec / spec / matchers / mock_constraint_matchers_spec.rb
blobbde48686a6d519a2aaa9bb9c51a16945df938d26
1 require File.dirname(__FILE__) + '/../../spec_helper.rb'
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
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
21 describe "The an_instance_of() mock argument constraint matcher" do
22   # NOTE - this is implemented as a predicate_matcher - see behaviour.rb
23   specify { an_instance_of(String).should == "string"  }
24 end