Permalink
Browse files

Cleanup whitespace.

  • Loading branch information...
1 parent f88feba commit e2ef482313af8a799ed3a23147e72675738ddf90 @myronmarston myronmarston committed Oct 23, 2012
Showing with 10 additions and 10 deletions.
  1. +10 −10 spec/rspec/matchers/be_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe "should be_predicate" do
+describe "should be_predicate" do
it "passes when actual returns true for :predicate?" do
actual = stub("actual", :happy? => true)
actual.should be_happy
@@ -17,28 +17,28 @@
actual.should be_happy
}.should fail_with("expected happy? to return true, got false")
end
-
+
it "fails when actual returns false for :predicate?" do
actual = stub("actual", :happy? => nil)
lambda {
actual.should be_happy
}.should fail_with("expected happy? to return true, got nil")
end
-
+
it "fails when actual does not respond to :predicate?" do
lambda {
Object.new.should be_happy
}.should raise_error(NameError, /happy\?/)
end
-
+
it "fails on error other than NameError" do
actual = stub("actual")
actual.should_receive(:foo?).and_raise("aaaah")
lambda {
actual.should be_foo
}.should raise_error(/aaaah/)
end
-
+
it "fails on error other than NameError (with the present tense predicate)" do
actual = Object.new
actual.should_receive(:foos?).and_raise("aaaah")
@@ -53,12 +53,12 @@
actual = stub("actual", :happy? => false)
actual.should_not be_happy
end
-
+
it "passes when actual returns nil for :sym?" do
actual = stub("actual", :happy? => nil)
actual.should_not be_happy
end
-
+
it "fails when actual returns true for :sym?" do
actual = stub("actual", :happy? => true)
lambda {
@@ -87,7 +87,7 @@
actual.should be_older_than(3)
}.should fail_with("expected older_than?(3) to return true, got false")
end
-
+
it "fails when actual does not respond to :predicate?" do
lambda {
Object.new.should be_older_than(3)
@@ -101,7 +101,7 @@
actual.should_receive(:older_than?).with(3).and_return(false)
actual.should_not be_older_than(3)
end
-
+
it "fails when actual returns true for :predicate?(*args)" do
actual = mock("actual")
actual.should_receive(:older_than?).with(3).and_return(true)
@@ -444,7 +444,7 @@ def large?
it "passes when direct class matches" do
5.should be_an_instance_of(Fixnum)
end
-
+
it "fails when class is higher up hierarchy" do
5.should_not be_an_instance_of(Numeric)
end

0 comments on commit e2ef482

Please sign in to comment.