Commit 7045e297 by Prem Sichanugrist

Remove constant warning from Thumbnail test

parent 201702b7
...@@ -226,11 +226,16 @@ class ThumbnailTest < Test::Unit::TestCase ...@@ -226,11 +226,16 @@ class ThumbnailTest < Test::Unit::TestCase
end end
context "passing a custom file geometry parser" do context "passing a custom file geometry parser" do
teardown do
self.class.send(:remove_const, :GeoParser)
end
should "produce the appropriate transformation_command" do should "produce the appropriate transformation_command" do
GeoParser = Class.new do GeoParser = Class.new do
def self.from_file(file) def self.from_file(file)
new new
end end
def transformation_to(target, should_crop) def transformation_to(target, should_crop)
["SCALE", "CROP"] ["SCALE", "CROP"]
end end
...@@ -252,6 +257,10 @@ class ThumbnailTest < Test::Unit::TestCase ...@@ -252,6 +257,10 @@ class ThumbnailTest < Test::Unit::TestCase
end end
context "passing a custom geometry string parser" do context "passing a custom geometry string parser" do
teardown do
self.class.send(:remove_const, :GeoParser)
end
should "produce the appropriate transformation_command" do should "produce the appropriate transformation_command" do
GeoParser = Class.new do GeoParser = Class.new do
def self.parse(s) def self.parse(s)
......
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