spec/unit/interpolation_spec.rb in bulldog-0.1.1 vs spec/unit/interpolation_spec.rb in bulldog-0.2.0
- old
+ new
@@ -41,11 +41,11 @@
before do
Thing.has_attachment :photo do
style :small
store_attributes :file_name => nil
end
- @thing = Thing.new(:photo => test_image_file('test.jpg'))
+ @thing = Thing.new(:photo => uploaded_file('test.jpg'))
@style = Thing.attachment_reflections[:photo].styles[:small]
end
it "should interpolate :class as the plural class name" do
interpolate("a/:class/b").should == "a/things/b"
@@ -130,10 +130,10 @@
Thing.has_attachment :photo do
style :small, {}
store_attributes :file_name => :photo_file_name
end
- @thing = Thing.new(:photo => test_image_file('test.jpg'))
+ @thing = Thing.new(:photo => uploaded_file('test.jpg'))
@style = Thing.attachment_reflections[:photo].styles[:small]
end
it "should interpolate :basename as the basename of the uploaded file" do
interpolate("a/:basename/b").should == "a/test.jpg/b"