Sha256: 95fd6a88ca06e23a036432ed1551e80f408a053b521b7aaed492a9bb2e6866e5

Contents?: true

Size: 914 Bytes

Versions: 5

Compression:

Stored size: 914 Bytes

Contents

require "helper"

# Tests that verify that on 1.8 versions of ruby, simplecov simply
# does not launch and does not cause errors on the way
#
# TODO: This should be expanded upon all methods that could potentially
# be called in a test/spec-helper simplecov config block
#
describe "Ruby 1.8 fallback" do
  it "return false when calling SimpleCov.start" do
    expect(SimpleCov.start).to be false
  end

  it "return false when calling SimpleCov.start with a block" do
    expect(SimpleCov.start { raise "Shouldn't reach this!" }).to be false
  end

  it "return false when calling SimpleCov.configure with a block" do
    expect(SimpleCov.configure { raise "Shouldn't reach this!" }).to be false
  end

  it "allow to define a profile" do
    expect do
      SimpleCov.profiles.define "testprofile" do
        add_filter "/config/"
      end
    end.not_to raise_error
  end
end if RUBY_VERSION.start_with? "1.8"

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
abaci-0.3.0 vendor/bundle/gems/simplecov-0.12.0/spec/1_8_fallbacks_spec.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/simplecov-0.12.0/spec/1_8_fallbacks_spec.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/simplecov-0.12.0/spec/1_8_fallbacks_spec.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/simplecov-0.12.0/spec/1_8_fallbacks_spec.rb
simplecov-0.12.0 spec/1_8_fallbacks_spec.rb