Browse files

Only run the interoperability tests if an environment variable is set.

  • Loading branch information...
1 parent 6fbef18 commit 7b1f470e22c44e5097d512d2d3ea57db70c02721 @threedaymonk committed Nov 30, 2011
Showing with 9 additions and 7 deletions.
  1. +9 −7 test/interoperability_test.rb
View
16 test/interoperability_test.rb
@@ -1,13 +1,15 @@
# encoding: UTF-8
require File.expand_path("../common", __FILE__)
-class HTMLEntities::InteroperabilityTest < Test::Unit::TestCase
+if ENV["RUN_INTEROPERABILITY_TESTS"]
+ class HTMLEntities::InteroperabilityTest < Test::Unit::TestCase
- def test_should_encode_active_support_safe_buffer
- require 'active_support'
- string = "<p>This is a test</p>"
- buffer = ActiveSupport::SafeBuffer.new(string)
- coder = HTMLEntities.new
- assert_equal coder.encode(string, :named), coder.encode(buffer, :named)
+ def test_should_encode_active_support_safe_buffer
+ require 'active_support'
+ string = "<p>This is a test</p>"
+ buffer = ActiveSupport::SafeBuffer.new(string)
+ coder = HTMLEntities.new
+ assert_equal coder.encode(string, :named), coder.encode(buffer, :named)
+ end
end
end

0 comments on commit 7b1f470

Please sign in to comment.