spec/api-client/errors_spec.rb in api-client-1.5.2 vs spec/api-client/errors_spec.rb in api-client-1.5.3
- old
+ new
@@ -19,6 +19,17 @@
it "should set a unique message for each attribute" do
@user.errors.unique_messages.should == { :a => "can't be blank and is not included in the list" }
end
end
+
+ describe "#unique_message" do
+ before :each do
+ @user = User.new
+ @user.valid?
+ end
+
+ it "should return a unique message for the given attribute" do
+ @user.errors.unique_message(:a).should == "can't be blank and is not included in the list"
+ end
+ end
end