Skip to content

Instantly share code, notes, and snippets.

@timdiggins
Created May 12, 2016 06:02
Show Gist options
  • Save timdiggins/46782db39cee51f88e000cd9c7a04b06 to your computer and use it in GitHub Desktop.
Save timdiggins/46782db39cee51f88e000cd9c7a04b06 to your computer and use it in GitHub Desktop.
Simple script to test rspec_junit_formatter against all the rspec versions
#!/usr/bin/env ruby
def header(version)
puts
puts "-" * 80
puts " rspec #{version}"
end
def run(version, command)
system <<-SCRIPT
export BUNDLE_GEMFILE=$PWD/gemfiles/Gemfile.rspec#{version} && #{command}
SCRIPT
end
def install(version)
run(version, "bundle install")
end
def test(version)
run(version, "bundle exec rspec spec")
end
VERSIONS = %w{2 3-0 3-1 3-2 3-3 3-4}
VERSIONS.each do |v|
header(v)
# install(v)
test(v)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment