• Download Gist
RMagic-2.13.1-fix-test-for-Ruby-1.9.3.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
From 9494cc6c1439df7d3a434a95292f2e295affd07f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 7 Feb 2012 11:59:37 +0100
Subject: [PATCH] Fix test for Ruby 1.9.3.
 
---
test/Image1.rb | 2 +-
test/Image2.rb | 2 +-
test/Image3.rb | 4 ++--
test/ImageList1.rb | 2 +-
test/Image_attributes.rb | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
 
diff --git a/test/Image1.rb b/test/Image1.rb
index bcda7ca..0e0ff2b 100644
--- a/test/Image1.rb
+++ b/test/Image1.rb
@@ -6,7 +6,7 @@ require 'test/unit/ui/console/testrunner' if RUBY_VERSION != '1.9.1'
class Image1_UT < Test::Unit::TestCase
- FreezeError = RUBY_VERSION == '1.9.1' ? RuntimeError : TypeError
+ FreezeError = RUBY_VERSION >= '1.9.1' ? RuntimeError : TypeError
def setup
@img = Magick::Image.new(20, 20)
diff --git a/test/Image2.rb b/test/Image2.rb
index 45dc682..dedf3a5 100644
--- a/test/Image2.rb
+++ b/test/Image2.rb
@@ -8,7 +8,7 @@ require 'test/unit/ui/console/testrunner' if RUBY_VERSION != '1.9.1'
class Image2_UT < Test::Unit::TestCase
- FreezeError = RUBY_VERSION == '1.9.1' ? RuntimeError : TypeError
+ FreezeError = RUBY_VERSION >= '1.9.1' ? RuntimeError : TypeError
def setup
@img = Magick::Image.new(20, 20)
diff --git a/test/Image3.rb b/test/Image3.rb
index 09576cf..11ad220 100644
--- a/test/Image3.rb
+++ b/test/Image3.rb
@@ -33,7 +33,7 @@ ColorspaceTypes = [
class Image3_UT < Test::Unit::TestCase
- FreezeError = RUBY_VERSION == '1.9.1' ? RuntimeError : TypeError
+ FreezeError = RUBY_VERSION >= '1.9.1' ? RuntimeError : TypeError
def setup
@img = Magick::Image.new(20, 20)
@@ -998,4 +998,4 @@ if __FILE__ == $0
IMAGES_DIR = '../doc/ex/images'
FILES = Dir[IMAGES_DIR+'/Button_*.gif']
Test::Unit::UI::Console::TestRunner.run(Image3_UT) if RUBY_VERSION != '1.9.1'
-end
\ No newline at end of file
+end
diff --git a/test/ImageList1.rb b/test/ImageList1.rb
index d94c0db..d6c2cd9 100644
--- a/test/ImageList1.rb
+++ b/test/ImageList1.rb
@@ -500,7 +500,7 @@ class ImageList1_UT < Test::Unit::TestCase
assert_raise(ArgumentError) { @list.map! { 2 } }
end
- if RUBY_VERSION != '1.9.1'
+ if RUBY_VERSION < '1.9.1'
def test_nitems
n = nil
assert_nothing_raised { n = @list.nitems }
diff --git a/test/Image_attributes.rb b/test/Image_attributes.rb
index b9ab83f..1743f10 100644
--- a/test/Image_attributes.rb
+++ b/test/Image_attributes.rb
@@ -12,7 +12,7 @@ require 'test/unit/ui/console/testrunner' if RUBY_VERSION != '1.9.1'
class Image_Attributes_UT < Test::Unit::TestCase
- FreezeError = RUBY_VERSION == '1.9.1' ? RuntimeError : TypeError
+ FreezeError = RUBY_VERSION >= '1.9.1' ? RuntimeError : TypeError
def setup
@img = Magick::Image.new(100, 100)
--
1.7.7.6

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.