aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/models/censor_rule_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/censor_rule_spec.rb b/spec/models/censor_rule_spec.rb
index d216ba91c..3782cc630 100644
--- a/spec/models/censor_rule_spec.rb
+++ b/spec/models/censor_rule_spec.rb
@@ -76,7 +76,7 @@ describe 'when validating rules' do
it 'should be invalid without text' do
censor_rule = CensorRule.new
censor_rule.valid?.should == false
- censor_rule.errors.on(:text).should == "can't be blank"
+ censor_rule.errors[:text].should == ["can't be blank"]
end
describe 'when validating a regexp rule' do
@@ -96,7 +96,7 @@ describe 'when validating rules' do
it 'should add an error message to the text field with the regexp error message' do
Regexp.stub!(:new).and_raise(RegexpError.new("very bad regexp"))
@censor_rule.valid?.should == false
- @censor_rule.errors.on(:text).should == "very bad regexp"
+ @censor_rule.errors[:text].should == ["very bad regexp"]
end
end
@@ -106,7 +106,7 @@ describe 'when validating rules' do
it 'should not add any error message to the text field' do
Regexp.stub!(:new)
@censor_rule.valid?
- @censor_rule.errors.on(:text).should == nil
+ @censor_rule.errors[:text].should == []
end
end