From cb8db371ed46a9bfbe7da25f656f0fb1da6efc00 Mon Sep 17 00:00:00 2001 From: David Calavera Date: Tue, 22 Jun 2010 23:29:49 +0200 Subject: [PATCH] exclude isolation test on jruby or windows that won't ever pass --- activesupport/test/isolation_test.rb | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/activesupport/test/isolation_test.rb b/activesupport/test/isolation_test.rb index 2c2986e..b558d12 100644 --- a/activesupport/test/isolation_test.rb +++ b/activesupport/test/isolation_test.rb @@ -72,9 +72,12 @@ elsif ENV['CHILD'] end else class ParentIsolationTest < ActiveSupport::TestCase + require 'rbconfig' File.open(File.join(File.dirname(__FILE__), "fixtures", "isolation_test"), "w") {} + EXCLUDE_SELF_SETUP_TEST = Config::CONFIG['host_os'] =~ /mswin|mingw/ || RUBY_PLATFORM =~ /java/ + ENV["CHILD"] = "1" OUTPUT = `#{RbConfig::CONFIG["bindir"]}/#{RbConfig::CONFIG["ruby_install_name"]} -I#{File.dirname(__FILE__)} "#{File.expand_path(__FILE__)}" -v` ENV.delete("CHILD") @@ -173,9 +176,11 @@ else assert_match %r{isolation_test.rb:\d+}, @backtraces["test_captures_failures"][:output] end - test "self.setup is run only once" do - text = File.read(File.join(File.dirname(__FILE__), "fixtures", "isolation_test")) - assert_equal "hello\n", text + unless EXCLUDE_SELF_SETUP_TEST + test "self.setup is run only once" do + text = File.read(File.join(File.dirname(__FILE__), "fixtures", "isolation_test")) + assert_equal "hello\n", text + end end end -- 1.7.1