lib/rspec/matchers/be.rb in rspec-expectations-2.0.0.beta.8 vs lib/rspec/matchers/be.rb in rspec-expectations-2.0.0.beta.9

- old
+ new

@@ -1,20 +1,20 @@ require 'rspec/matchers/dsl' -Rspec::Matchers.define :be_true do +RSpec::Matchers.define :be_true do match do |actual| !!actual end end -Rspec::Matchers.define :be_false do +RSpec::Matchers.define :be_false do match do |actual| !actual end end -Rspec::Matchers.define :be_nil do +RSpec::Matchers.define :be_nil do match do |actual| actual.nil? end failure_message_for_should do |actual| @@ -24,15 +24,15 @@ failure_message_for_should_not do "expected not nil, got nil" end end -module Rspec +module RSpec module Matchers class Be #:nodoc: - include Rspec::Matchers::Pretty + include RSpec::Matchers::Pretty def initialize(*args, &block) @args = args end @@ -214,10 +214,10 @@ # Given true, false, or nil, will pass if actual value is # true, false or nil (respectively). Given no args means # the caller should satisfy an if condition (to be or not to be). # # Predicates are any Ruby method that ends in a "?" and returns true or false. - # Given be_ followed by arbitrary_predicate (without the "?"), Rspec will match + # Given be_ followed by arbitrary_predicate (without the "?"), RSpec will match # convert that into a query against the target object. # # The arbitrary_predicate feature will handle any predicate # prefixed with "be_an_" (e.g. be_an_instance_of), "be_a_" (e.g. be_a_kind_of) # or "be_" (e.g. be_empty), letting you choose the prefix that best suits the predicate.