Sha256: 03dfbf2eac885560490b8a9cb96f55d91dc391e4bf426d59c298e48926df1e44

Contents?: true

Size: 739 Bytes

Versions: 2

Compression:

Stored size: 739 Bytes

Contents

require "bundler/gem_tasks"

def run_jasmine_phantom_test_case(name)
  puts "Running #{name}..."
  puts "---"

  output = Dir.chdir("test-cases/#{name}") do
    Bundler.with_clean_env do
      sh "bundle install > /dev/null"
      `bundle exec rake jasmine:phantom:ci 2>&1`
    end
  end

  if $?.success?
    puts "Expected #{name} to fail, but it did not"
    exit 1
  end

  if output !~ /2 specs | 1 failing/
    puts "Expected #{name} output to include '2 specs | 1 failing', but it did not"
    puts "Output was:"
    puts output
    exit 1
  end

  puts "#{name} passed!"
end

task :test do
  run_jasmine_phantom_test_case 'rails-3.2-jasmine-1.2.0'
  run_jasmine_phantom_test_case 'rails-3.2-jasmine-1.2.1'
end

task default: :test

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
jasmine-phantom-0.0.8 Rakefile
jasmine-phantom-0.0.7 Rakefile