Skip to content

Instantly share code, notes, and snippets.

@calavera
Created September 22, 2009 09:43
Show Gist options
  • Save calavera/190948 to your computer and use it in GitHub Desktop.
Save calavera/190948 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
RUBYSPEC_PATH = '../rubyspec/'
if ARGV.length == 1
Dir.glob("#{RUBYSPEC_PATH}#{ARGV[0]}/*_spec.rb") do |spec|
system("bin/jruby -T -J-Djruby.compat.version=RUBY1_9 spec/mspec/bin/mspec #{File.expand_path(spec)}")
end
elsif ARGV.length >= 2
ARGV[1..-1].each do |arg|
spec = File.expand_path("#{RUBYSPEC_PATH}#{File.join(ARGV[0], arg)}_spec.rb")
system("bin/jruby -T -J-Djruby.compat.version=RUBY1_9 spec/mspec/bin/mspec #{spec}")
system("bin/jruby spec/mspec/bin/mspec #{spec}")
end
else
puts "Usage: ./run_specs PATH [SPEC_NAME] [SPEC_NAME] ..."
end
# within jruby~main directory
./run_specs core/array
./run_specs core/array flatten join
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment