Sha256: 141dfb1bc40184e2e98054fdbd6d992d11fa32fb2701d49b5632e628805796b6

Contents?: true

Size: 869 Bytes

Versions: 1

Compression:

Stored size: 869 Bytes

Contents

# encoding: utf-8

describe "Rake::Task['test:coverage:display']", :tasks do

  before { ENV.delete "SIMPLECOV_OUTPUT" }
  after  { Rake::Task["test:coverage:display"].invoke }

  it "loads metric" do
    expect(Hexx::RSpec::Metrics::SimpleCov).to receive(:load)
  end

  it "displays results for metric settings" do
    expect(Hexx::RSpec).to receive(:[]).with "launchy tmp/coverage/index.html"
  end

  it "displays results for default ENV settings" do
    allow(Hexx::RSpec::Metrics::SimpleCov).to receive(:load)
    expect(Hexx::RSpec).to receive(:[]).with "launchy coveralls/index.html"
  end

  it "displays results for custom ENV settings" do
    allow(Hexx::RSpec::Metrics::SimpleCov).to receive(:load)
    ENV["SIMPLECOV_OUTPUT"] = "custom"
    expect(Hexx::RSpec).to receive(:[]).with "launchy custom"
  end

end # describe Rake::Task[:test:coverage:display]

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hexx-rspec-0.5.1 spec/unit/tasks/test_coverage_display_spec.rb