Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Also stubbing the new call on `Cocaine::CommandLine`

  • Loading branch information...
commit 0a77f64558c1f1bec91f139bfe3b371fa4a88865 1 parent 3a35ba9
@sikachu sikachu authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 test/paperclip_test.rb
View
11 test/paperclip_test.rb
@@ -2,10 +2,19 @@
class PaperclipTest < Test::Unit::TestCase
context "Calling Paperclip.run" do
- should "run the command with Cocaine" do
+ setup do
Cocaine::CommandLine.expects(:new).with("convert", "stuff").returns(stub(:run))
+ @original_command_line_path = Cocaine::CommandLine.path
+ end
+
+ teardown do
+ Cocaine::CommandLine.path = @original_command_line_path
+ end
+
+ should "run the command with Cocaine" do
Paperclip.run("convert", "stuff")
end
+
should "save Cocaine::CommandLine.path that set before" do
Cocaine::CommandLine.path = "/opt/my_app/bin"
Paperclip.run("convert", "stuff")
Please sign in to comment.
Something went wrong with that request. Please try again.