spec/rspec/rails/matchers/errors_on_spec.rb in rspec-rails-2.0.0.beta.17 vs spec/rspec/rails/matchers/errors_on_spec.rb in rspec-rails-2.0.0.beta.18
- old
+ new
@@ -2,11 +2,11 @@
describe "error_on" do
it "should provide a description including the name of what the error is on" do
have(1).error_on(:whatever).description.should == "have 1 error on :whatever"
end
-
+
it "should provide a failure message including the number actually given" do
lambda {
[].should have(1).error_on(:whatever)
}.should raise_error("expected 1 error on :whatever, got 0")
end
@@ -14,10 +14,10 @@
describe "errors_on" do
it "should provide a description including the name of what the error is on" do
have(2).errors_on(:whatever).description.should == "have 2 errors on :whatever"
end
-
+
it "should provide a failure message including the number actually given" do
lambda {
[1].should have(3).errors_on(:whatever)
}.should raise_error("expected 3 errors on :whatever, got 1")
end