removed incomplete file dump since it glitches for local workers and runners. patched to work with latest therubyracer
This commit is contained in:
parent
c1ed4ec12a
commit
da1d3f9d44
1
Rakefile
1
Rakefile
|
@ -13,6 +13,7 @@ begin
|
||||||
gem.add_development_dependency "shoulda", "= 2.10.3"
|
gem.add_development_dependency "shoulda", "= 2.10.3"
|
||||||
gem.add_development_dependency "rspec", "= 1.3.0"
|
gem.add_development_dependency "rspec", "= 1.3.0"
|
||||||
gem.add_development_dependency "cucumber", "= 0.7.2"
|
gem.add_development_dependency "cucumber", "= 0.7.2"
|
||||||
|
gem.add_development_dependency "therubyracer", "= 0.7.4"
|
||||||
end
|
end
|
||||||
Jeweler::GemcutterTasks.new
|
Jeweler::GemcutterTasks.new
|
||||||
rescue LoadError
|
rescue LoadError
|
||||||
|
|
|
@ -33,12 +33,6 @@ module Hydra #:nodoc:
|
||||||
# * :autosort
|
# * :autosort
|
||||||
# * Set to false to disable automatic sorting by historical run-time per file
|
# * Set to false to disable automatic sorting by historical run-time per file
|
||||||
def initialize(opts = { })
|
def initialize(opts = { })
|
||||||
trap("SIGINT") do
|
|
||||||
puts "Testing halted by user. Untested files:"
|
|
||||||
puts @incomplete_files.join("\n")
|
|
||||||
exit
|
|
||||||
end
|
|
||||||
|
|
||||||
opts.stringify_keys!
|
opts.stringify_keys!
|
||||||
config_file = opts.delete('config') { nil }
|
config_file = opts.delete('config') { nil }
|
||||||
if config_file
|
if config_file
|
||||||
|
|
|
@ -187,7 +187,7 @@ module Hydra #:nodoc:
|
||||||
}
|
}
|
||||||
context['reportErrors'] = lambda{|js_errors|
|
context['reportErrors'] = lambda{|js_errors|
|
||||||
js_errors.each do |e|
|
js_errors.each do |e|
|
||||||
e = V8::To.ruby(e)
|
e = V8::To.rb(e)
|
||||||
errors << "\n\e[1;31mJSLINT: #{file}\e[0m"
|
errors << "\n\e[1;31mJSLINT: #{file}\e[0m"
|
||||||
errors << " Error at line #{e['line'].to_i + 1} " +
|
errors << " Error at line #{e['line'].to_i + 1} " +
|
||||||
"character #{e['character'].to_i + 1}: \e[1;33m#{e['reason']}\e[0m"
|
"character #{e['character'].to_i + 1}: \e[1;33m#{e['reason']}\e[0m"
|
||||||
|
|
|
@ -40,13 +40,13 @@ class RunnerTest < Test::Unit::TestCase
|
||||||
should "run a js lint file and find errors" do
|
should "run a js lint file and find errors" do
|
||||||
runner = Hydra::Runner.new(:io => File.new('/dev/null', 'w'))
|
runner = Hydra::Runner.new(:io => File.new('/dev/null', 'w'))
|
||||||
results = runner.run_file(javascript_file)
|
results = runner.run_file(javascript_file)
|
||||||
assert results =~ /Missing semicolon/
|
assert results =~ /Missing semicolon/, results
|
||||||
end
|
end
|
||||||
|
|
||||||
should "run a json data file and find errors" do
|
should "run a json data file and find errors" do
|
||||||
runner = Hydra::Runner.new(:io => File.new('/dev/null', 'w'))
|
runner = Hydra::Runner.new(:io => File.new('/dev/null', 'w'))
|
||||||
results = runner.run_file(json_file)
|
results = runner.run_file(json_file)
|
||||||
assert results =~ /trailing comma/
|
assert results =~ /trailing comma/, results
|
||||||
end
|
end
|
||||||
|
|
||||||
should "run two rspec tests" do
|
should "run two rspec tests" do
|
||||||
|
|
Loading…
Reference in New Issue