spec/unit/attachment/base_spec.rb in bulldog-0.0.10 vs spec/unit/attachment/base_spec.rb in bulldog-0.0.11
- old
+ new
@@ -337,9 +337,25 @@
end
thing = Thing.new(:attachment => test_empty_file)
lambda{thing.attachment.process!(:event)}.should_not raise_error(ActiveRecord::RecordInvalid)
end
end
+
+ it "should pass the given options to #process" do
+ with_test_processor(:error => false) do
+ styles = nil
+ Thing.has_attachment :attachment do
+ style :one
+ style :two
+ process :on => :event, :with => :base do
+ styles = self.styles.map(&:name)
+ end
+ end
+ thing = Thing.new(:attachment => test_empty_file)
+ thing.attachment.process!(:event, :styles => [:one])
+ styles.should == [:one]
+ end
+ end
end
describe "storable attributes" do
use_model_class(:Thing,
:photo_file_name => :string,