From 60b986a5b971f704a41f1c720a9471ea92040fc7 Mon Sep 17 00:00:00 2001 From: Simon Rozet Date: Mon, 23 Jun 2008 09:56:18 +0200 Subject: [PATCH] fix a failing spec for context model --- spec/models/context_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spec/models/context_spec.rb b/spec/models/context_spec.rb index ffb6b121..50eb0eb1 100644 --- a/spec/models/context_spec.rb +++ b/spec/models/context_spec.rb @@ -30,9 +30,8 @@ describe "Context validations" do it "should have two errors with a missing name" do @context.attributes = valid_context_attributes.except(:name) @context.should_not be_valid - @context.should have(2).error_on(:name) - @context.errors.on(:name)[0].should eql("context must have a name") - @context.errors.on(:name)[1].should eql("context name must be less than 256 characters") + @context.should have(1).error_on(:name) + @context.error_on(:name).should include('context must have a name') end it "should have one error with a name of more than 255 characters" do