spec/api-client/errors_spec.rb in api-client-2.0.0.rc1 vs spec/api-client/errors_spec.rb in api-client-2.0.0.rc2
- old
+ new
@@ -1,35 +1,35 @@
require 'spec_helper'
describe ApiClient::Errors do
- describe "#add_errors" do
+ describe '#add_errors' do
before :each do
- @errors = ApiClient::Errors.new(self).add_errors({:a => 'b'})
+ @errors = ApiClient::Errors.new(self).add_errors({ :a => 'b' })
end
- it "should initialize a new object" do
+ it 'should initialize a new object' do
@errors[:a].should == 'b'
end
end
- describe "#unique_messages" do
+ describe '#unique_messages' do
before :each do
@user = User.new
@user.valid?
end
- it "should set a unique message for each attribute" do
+ 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
+ describe '#unique_message' do
before :each do
@user = User.new
@user.valid?
end
- it "should return a unique message for the given attribute" do
+ 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
+end
\ No newline at end of file