tweak a test for multi-platform run
This commit is contained in:
parent
c5956ee7d3
commit
1d4d5f397a
30
Rakefile
30
Rakefile
@ -1,2 +1,32 @@
|
||||
require 'bundler'
|
||||
Bundler::GemHelper.install_tasks
|
||||
|
||||
require 'rspec/core/rake_task'
|
||||
|
||||
RSpec::Core::RakeTask.new(:spec)
|
||||
|
||||
namespace :spec do
|
||||
desc "Run on three Rubies"
|
||||
task :platforms do
|
||||
current = %x{rvm-prompt v}
|
||||
|
||||
fail = false
|
||||
%w{1.8.7 1.9.2 ree}.each do |version|
|
||||
puts "Switching to #{version}"
|
||||
Bundler.with_clean_env do
|
||||
system %{bash -c 'source ~/.rvm/scripts/rvm ; rvm #{version} ; bundle install ; bundle exec rake spec'}
|
||||
end
|
||||
if $?.exitstatus != 0
|
||||
fail = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
system %{rvm #{current}}
|
||||
|
||||
exit (fail ? 1 : 0)
|
||||
end
|
||||
end
|
||||
|
||||
task :default => 'spec:platforms'
|
||||
|
||||
|
@ -45,8 +45,8 @@ describe Jasmine::CLI do
|
||||
let(:test_data) { %w{third fourth} }
|
||||
|
||||
before do
|
||||
File.open(GLOBAL_DEFAULTS_FILE, 'w') { |fh| fh.puts global_test_data.join(' ') }
|
||||
File.open(DEFAULTS_FILE, 'w') { |fh| fh.puts test_data.join(' ') }
|
||||
File.open(Jasmine::CLI::GLOBAL_DEFAULTS_FILE, 'w') { |fh| fh.puts global_test_data.join(' ') }
|
||||
File.open(Jasmine::CLI::DEFAULTS_FILE, 'w') { |fh| fh.puts test_data.join(' ') }
|
||||
end
|
||||
|
||||
it "should read the options" do
|
||||
|
Loading…
Reference in New Issue
Block a user