Sha256: f65fa618bb78a73f4e5b9cd322edbfab218c9f4bff80a66f7562cdc63311a8c8

Contents?: true

Size: 978 Bytes

Versions: 10

Compression:

Stored size: 978 Bytes

Contents

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"]
    # @rake.options.trace = true
    jasmine_out = run_task 'jasmine:ci'
    if jasmine_out.include? "0 failures"
      js_specs_count = Dir['spec/javascripts/**/*_spec.{js,coffee,js.coffee}'].count
      puts "#{jasmine_out.match(/\n(.+) specs/)[1]} jasmine specs run (in #{js_specs_count} jasmine test files)"
    else
      puts "\n\n************************  Jasmine Output *************"
      puts jasmine_out
      puts "************************  Jasmine Output *************\n\n"
    end
    expect(jasmine_out).to include "0 failures"
    expect(jasmine_out).not_to include "\n0 specs"
  end
end

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

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 spec/javascripts/jasmine_spec.rb
hyrax-1.1.0 spec/javascripts/jasmine_spec.rb
hyrax-1.0.5 spec/javascripts/jasmine_spec.rb
hyrax-1.0.4 spec/javascripts/jasmine_spec.rb
hyrax-1.0.3 spec/javascripts/jasmine_spec.rb
hyrax-1.0.2 spec/javascripts/jasmine_spec.rb
hyrax-1.0.1 spec/javascripts/jasmine_spec.rb
hyrax-1.0.0.rc2 spec/javascripts/jasmine_spec.rb
hyrax-1.0.0.rc1 spec/javascripts/jasmine_spec.rb
test_hyrax-0.0.1.alpha spec/javascripts/jasmine_spec.rb