Permalink
Browse files

Need to replace test to test functionality on windows

  • Loading branch information...
1 parent e79d7a8 commit 77b1006874eb2ede0597302daa0bb998f85f1a72 @2potatocakes 2potatocakes committed Dec 20, 2011
Showing with 6 additions and 9 deletions.
  1. +1 −1 lib/mini_magick.rb
  2. +1 −1 mini_magick.gemspec
  3. +3 −7 test/image_test.rb
  4. +1 −0 test/test_helper.rb
View
@@ -353,7 +353,7 @@ def combine_options(tool = :mogrify, &block)
# Check to see if we are running on win32 -- we need to escape things differently
def windows?
- !(RUBY_PLATFORM =~ /win32|mswin|mingw/).nil?
+ RUBY_PLATFORM =~ /mswin|mingw|cygwin/
end
def composite(other_image, output_extension = 'jpg', &block)
View
@@ -16,5 +16,5 @@ Gem::Specification.new do |s|
s.files = Dir['README.rdoc', 'VERSION', 'MIT-LICENSE', 'Rakefile', 'lib/**/*']
s.test_files = Dir['test/**/*']
s.require_paths = ["lib"]
- s.add_runtime_dependency('subexec', ['~> 0.2.1'])
+ s.add_runtime_dependency('subexec', ['~> 0.2.0'])
end
View
@@ -230,13 +230,9 @@ def test_simple_composite
result = image.composite(Image.open(TIFF_IMAGE_PATH)) do |c|
c.gravity "center"
end
- begin
- #TODO - this test won't run on windows
- assert `diff -s #{result.path} test/composited.jpg`.include?("identical")
- rescue Exception => ex
- test = 4
- end
-
+ #TODO - need to write test that works cross platform
+ #This test will only work on Linux
+ assert `diff -s #{result.path} #{COMP_IMAGE_PATH}`.include?("identical") unless RUBY_PLATFORM =~ /mswin|mingw|cygwin/
end
# http://github.com/probablycorey/mini_magick/issues#issue/8
View
@@ -16,4 +16,5 @@ module MiniMagickTestFiles
CAP_EXT_PATH = test_files + "/trogdor_capitalized.JPG"
ANIMATION_PATH = test_files + "/animation.gif"
PNG_PATH = test_files + "/png.png"
+ COMP_IMAGE_PATH = test_files + "/composited.jpg"
end

0 comments on commit 77b1006

Please sign in to comment.