Permalink
Browse files

Make specs less dependent on the current locale.

  • Loading branch information...
1 parent 3cab20e commit 22e3a99d96537a35d0e7166a6abbef2208ed4bd5 @parndt parndt committed Nov 11, 2012
Showing with 7 additions and 2 deletions.
  1. +7 −2 resources/spec/models/refinery/resource_spec.rb
@@ -105,7 +105,10 @@ module Refinery
it "should contain an error message" do
@resource.valid?
@resource.errors.should_not be_empty
- @resource.errors[:file].should == ["File should be smaller than #{Resources.max_file_size} bytes in size"]
+ @resource.errors[:file].should == Array(::I18n.t(
+ 'too_big', :scope => 'activerecord.errors.models.refinery/resource',
+ :size => Resources.max_file_size
+ ))
end
end
@@ -117,7 +120,9 @@ module Refinery
it "has an error message" do
@resource.valid?
@resource.errors.should_not be_empty
- @resource.errors[:file].should == ["You must specify file for upload"]
+ @resource.errors[:file].should == Array(::I18n.t(
+ 'blank', :scope => 'activerecord.errors.models.refinery/resource'
+ ))
end
end
end

0 comments on commit 22e3a99

Please sign in to comment.