Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
0a77f645
Commit
0a77f645
authored
Sep 23, 2011
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also stubbing the new call on `Cocaine::CommandLine`
parent
3a35ba9f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
test/paperclip_test.rb
+10
-1
No files found.
test/paperclip_test.rb
View file @
0a77f645
...
...
@@ -2,10 +2,19 @@ require './test/helper'
class
PaperclipTest
<
Test
::
Unit
::
TestCase
context
"Calling Paperclip.run"
do
s
hould
"run the command with Cocaine"
do
s
etup
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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment