Created
February 7, 2012 11:02
-
-
Save voxik/1759135 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 9494cc6c1439df7d3a434a95292f2e295affd07f Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <[email protected]> | |
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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment