Sha256: a9a102e5e5f3670ac70a617d128734c722419eaf475d393dac8bddb738a3b663

Contents?: true

Size: 624 Bytes

Versions: 3

Compression:

Stored size: 624 Bytes

Contents

# frozen_string_literal: true

require 'rake'

# Run the jasmine tests by running the jasmine:ci rake command and parses the output for failures.
# The spec will fail if any jasmine tests fails.
describe 'Jasmine' do
  it 'expects all jasmine tests to pass' do
    load_rake_environment ["#{jasmine_path}/lib/jasmine/tasks/jasmine.rake"]
    jasmine_out = run_task 'jasmine:ci'
    unless jasmine_out.include? '0 failures'
      puts 'Some of the Jasmine tests failed'
      puts jasmine_out
    end
    expect(jasmine_out).to include '0 failures'
  end
end

def jasmine_path
  Gem.loaded_specs['jasmine'].full_gem_path
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
browse-everything-1.0.0.rc1 spec/javascripts/jasmine_spec.rb
browse-everything-0.16.1 spec/javascripts/jasmine_spec.rb
browse-everything-0.16.0 spec/javascripts/jasmine_spec.rb