Commit 20bf50d0 by Jon Yurek

Removed tests regarding spawn

parent 9dd008d9
...@@ -235,42 +235,6 @@ class AttachmentTest < Test::Unit::TestCase ...@@ -235,42 +235,6 @@ class AttachmentTest < Test::Unit::TestCase
end end
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 context "An attachment with no processors defined" do
setup do setup do
rebuild_model :processors => [], :styles => {:something => 1} rebuild_model :processors => [], :styles => {:something => 1}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment