diff options
author | Louise Crow <louise.crow@gmail.com> | 2011-02-24 15:10:14 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2011-02-24 15:10:14 +0000 |
commit | 08a64f9e3139851fd65c7ba6969ee590b4afea6a (patch) | |
tree | 20c77e796002dfa95b2af3ba00ebd2f691c02fc7 /vendor/gems/rspec-1.3.1/lib/spec/expectations.rb | |
parent | 3757bb52c0aa86b779b00428d7ebe35b30cea1ee (diff) |
Adding rspec gem.
Diffstat (limited to 'vendor/gems/rspec-1.3.1/lib/spec/expectations.rb')
-rw-r--r-- | vendor/gems/rspec-1.3.1/lib/spec/expectations.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/vendor/gems/rspec-1.3.1/lib/spec/expectations.rb b/vendor/gems/rspec-1.3.1/lib/spec/expectations.rb new file mode 100644 index 000000000..13cf59b26 --- /dev/null +++ b/vendor/gems/rspec-1.3.1/lib/spec/expectations.rb @@ -0,0 +1,35 @@ +require 'spec/matchers' +require 'spec/expectations/fail_with' +require 'spec/expectations/errors' +require 'spec/expectations/extensions' +require 'spec/expectations/handler' + +module Spec + + # Spec::Expectations lets you set expectations on your objects. + # + # result.should == 37 + # team.should have(11).players_on_the_field + # + # == How Expectations work. + # + # Spec::Expectations adds two methods to Object: + # + # should(matcher=nil) + # should_not(matcher=nil) + # + # Both methods take an optional Expression Matcher (See Spec::Matchers). + # + # When +should+ receives an Expression Matcher, it calls <tt>matches?(self)</tt>. If + # it returns +true+, the spec passes and execution continues. If it returns + # +false+, then the spec fails with the message returned by <tt>matcher.failure_message</tt>. + # + # Similarly, when +should_not+ receives a matcher, it calls <tt>matches?(self)</tt>. If + # it returns +false+, the spec passes and execution continues. If it returns + # +true+, then the spec fails with the message returned by <tt>matcher.negative_failure_message</tt>. + # + # RSpec ships with a standard set of useful matchers, and writing your own + # matchers is quite simple. See Spec::Matchers for details. + module Expectations + end +end |