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
20bf50d0
Commit
20bf50d0
authored
Feb 08, 2009
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed tests regarding spawn
parent
9dd008d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
36 deletions
+0
-36
test/attachment_test.rb
+0
-36
No files found.
test/attachment_test.rb
View file @
20bf50d0
...
...
@@ -235,42 +235,6 @@ class AttachmentTest < Test::Unit::TestCase
end
end
context
"When spawn is not defined on the instance"
do
setup
do
rebuild_model
:styles
=>
{
:foo
=>
true
}
@dummy
=
Dummy
.
new
@file
=
StringIO
.
new
(
"12345"
)
end
should
"not call spawn on the instance when assigned a file"
do
@dummy
.
expects
(
:spawn
).
times
(
0
)
@dummy
.
avatar
.
expects
(
:post_process_styles
)
# This is pretty ugly, but mocha expectations make the object
# respond_to? things it wouldn't have. Gotta get around it.
class
<<
@dummy
def
respond_to_with_spawn?
(
method
)
(
method
==
:spawn
)
?
false
:
respond_to_without_spawn?
(
method
)
end
alias_method_chain
:respond_to?
,
:spawn
end
@dummy
.
avatar
=
@file
end
end
# context "When spawn is defined on the instance" do
# setup do
# Dummy.any_instance.stubs(:spawn)
# rebuild_model :styles => {:foo => true}
# @dummy = Dummy.new
# @file = StringIO.new("12345")
# end
# should "not call spawn on the instance when assigned a file" do
# @dummy.expects(:spawn)
# @dummy.avatar = @file
# end
# end
context
"An attachment with no processors defined"
do
setup
do
rebuild_model
:processors
=>
[],
:styles
=>
{
:something
=>
1
}
...
...
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