Sha256: 6d2567416c0163c958292e223729d4448d89cb5b361f33c48d1f54138c1e976f

Contents?: true

Size: 1.29 KB

Versions: 15

Compression:

Stored size: 1.29 KB

Contents

require 'rspec/matchers'
require 'rspec/expectations/fail_with'
require 'rspec/expectations/errors'
require 'rspec/expectations/extensions'
require 'rspec/expectations/handler'
require 'rspec/expectations/version'

module Rspec
  
  # Rspec::Expectations lets you set expectations on your objects.
  #
  #   result.should == 37
  #   team.should have(11).players_on_the_field
  #
  # == How Expectations work.
  #
  # Rspec::Expectations adds two methods to Object:
  #
  #   should(matcher=nil)
  #   should_not(matcher=nil)
  #
  # Both methods take an optional Expression Matcher (See Rspec::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 Rspec::Matchers for details.
  module Expectations
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rspec-expectations-2.0.0.beta.8 lib/rspec/expectations.rb
rspec-expectations-2.0.0.beta.7 lib/rspec/expectations.rb
rspec-expectations-2.0.0.beta.6 lib/rspec/expectations.rb
rspec-expectations-2.0.0.beta.5 lib/rspec/expectations.rb
rspec-expectations-2.0.0.beta.4 lib/rspec/expectations.rb
rspec-expectations-2.0.0.beta.3 lib/rspec/expectations.rb
rspec-expectations-2.0.0.beta.2 lib/rspec/expectations.rb
rspec-expectations-2.0.0.beta.1 lib/rspec/expectations.rb
rspec-expectations-2.0.0.a10 lib/rspec/expectations.rb
rspec-expectations-2.0.0.a9 lib/rspec/expectations.rb
rspec-expectations-2.0.0.a8 lib/rspec/expectations.rb
rspec-expectations-2.0.0.a7 lib/rspec/expectations.rb
rspec-expectations-2.0.0.a6 lib/rspec/expectations.rb
rspec-expectations-2.0.0.a5 lib/rspec/expectations.rb
rspec-expectations-2.0.0.a4 lib/rspec/expectations.rb