Sha256: 1816587585549c78b36e02563862818735fed60e27811798af2cf7e5570e8b8d

Contents?: true

Size: 1.25 KB

Versions: 38

Compression:

Stored size: 1.25 KB

Contents

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

Version data entries

38 entries across 38 versions & 11 rubygems

Version Path
rspec-instructure-1.3.3 lib/spec/expectations.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/rspec-1.3.2/lib/spec/expectations.rb
rspec-1.3.2 lib/spec/expectations.rb
rspec-1.3.1 lib/spec/expectations.rb
rspec-1.3.1.rc lib/spec/expectations.rb
rspec-1.3.0 lib/spec/expectations.rb
hubbub-0.0.11 lib/vendor/plugins/rspec/lib/spec/expectations.rb
hubbub-0.0.10 lib/vendor/plugins/rspec/lib/spec/expectations.rb
hubbub-0.0.9 lib/vendor/plugins/rspec/lib/spec/expectations.rb
hubbub-0.0.8 lib/vendor/plugins/rspec/lib/spec/expectations.rb
hubbub-0.0.6 lib/vendor/plugins/rspec/lib/spec/expectations.rb
simple-templater-0.0.1.4 gems/gems/rspec-1.2.9/lib/spec/expectations.rb
media-path-0.1.2 vendor/rspec/lib/spec/expectations.rb
simple-templater-0.0.1.3 vendor/rspec/lib/spec/expectations.rb
pupu-0.0.2.pre vendor/rspec/lib/spec/expectations.rb
media-path-0.1.1.pre vendor/rspec/lib/spec/expectations.rb
simple-templater-0.0.1.2 vendor/rspec/lib/spec/expectations.rb
media-path-0.1.1 vendor/rspec/lib/spec/expectations.rb
simple-templater-0.0.1.1 vendor/rspec/lib/spec/expectations.rb
pupu-0.0.2 vendor/rspec/lib/spec/expectations.rb