Skip to content

Commit

Permalink
multiruby:spec runs all specs against multiruby
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Dec 11, 2008
1 parent f8b70e0 commit 7498b4c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions multiruby/spec.sake
@@ -0,0 +1,14 @@
namespace 'multiruby' do
desc "Runs specs in current project against multiruby"
task :spec do
default_ruby_flags = "-w -I#{%w(lib ext bin test).join(File::PATH_SEPARATOR)}"
ruby_flags = ENV['RUBY_FLAGS'] || default_ruby_flags
filter = ENV['FILTER']
test_globs = ENV['TEST'] ? [ENV['TEST']] : ['spec/**/*_spec.rb']
tests = ['rubygems', 'spec'] +
test_globs.map { |g| Dir.glob(g) }.flatten
tests.map! {|f| %Q(require "#{f}")}
cmd = "#{ruby_flags} -e '#{tests.join("; ")}' #{filter}"
system "multiruby #{cmd}"
end
end

0 comments on commit 7498b4c

Please sign in to comment.