1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

check JS availability for CoffeeScript tests properly

This commit is contained in:
Konstantin Haase 2011-04-11 12:46:21 +02:00
parent e0e4388633
commit 91992c99f4
2 changed files with 7 additions and 1 deletions

View file

@ -39,5 +39,4 @@ platforms :mri_18 do
# bundler platforms are broken
next if RUBY_ENGINE != 'ruby' or RUBY_VERSION > "1.8"
gem 'rcov', :group => 'rcov'
gem 'therubyracer', :group => 'coffee-script'
end

View file

@ -2,6 +2,13 @@ require File.dirname(__FILE__) + '/helper'
begin
require 'coffee-script'
require 'execjs'
begin
ExecJS.compile '1'
rescue Exception
raise LoadError, 'unable to execute JavaScript'
end
class CoffeeTest < Test::Unit::TestCase
def coffee_app(options = {}, &block)