Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Commit

Permalink
Disable a few tests on jruby
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Jun 7, 2011
1 parent 33a722c commit f68c8c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
4 changes: 4 additions & 0 deletions test/sprockets_test.rb
Expand Up @@ -7,6 +7,10 @@
Encoding.default_internal = 'utf-8'
end

def jruby?
defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
end

class Sprockets::TestCase < Test::Unit::TestCase
FIXTURE_ROOT = File.expand_path(File.join(File.dirname(__FILE__), "fixtures"))

Expand Down
20 changes: 11 additions & 9 deletions test/test_environment.rb
Expand Up @@ -51,16 +51,18 @@ def self.test(name, &block)
end
end

test "eco templates" do
asset = @env["goodbye.jst"]
context = ExecJS.compile(asset)
assert_equal "Goodbye world\n", context.call("JST['goodbye']", :name => "world")
end
unless jruby?
test "eco templates" do
asset = @env["goodbye.jst"]
context = ExecJS.compile(asset)
assert_equal "Goodbye world\n", context.call("JST['goodbye']", :name => "world")
end

test "ejs templates" do
asset = @env["hello.jst"]
context = ExecJS.compile(asset)
assert_equal "hello: world\n", context.call("JST['hello']", :name => "world")
test "ejs templates" do
asset = @env["hello.jst"]
context = ExecJS.compile(asset)
assert_equal "hello: world\n", context.call("JST['hello']", :name => "world")
end
end

test "lookup mime type" do
Expand Down

0 comments on commit f68c8c3

Please sign in to comment.