Sha256: ce4a7c865fb333b11d2560586dfe37641ac9b18176a7242078d9ea2f57b778ad

Contents?: true

Size: 716 Bytes

Versions: 9

Compression:

Stored size: 716 Bytes

Contents

require "spec_helper"

module RSpec::Core::Notifications
  describe FailedExampleNotification do
    before do
      allow(RSpec.configuration).to receive(:color_enabled?).and_return(true)
    end

    it "uses the default color for the shared example backtrace line" do
      example = nil
      group = RSpec::Core::ExampleGroup.describe "testing" do
        shared_examples_for "a" do
          example = it "fails" do
            expect(1).to eq(2)
          end
        end
        it_behaves_like "a"
      end
      group.run
      fne = FailedExampleNotification.new(example)
      lines = fne.colorized_message_lines
      expect(lines).to include(match("\\e\\[37mShared Example Group:"))
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
opal-rspec-0.6.2 rspec-core/spec/rspec/core/failed_example_notification_spec.rb
opal-rspec-0.6.1 rspec-core/spec/rspec/core/failed_example_notification_spec.rb
opal-rspec-0.6.0 rspec-core/spec/rspec/core/failed_example_notification_spec.rb
opal-rspec-0.6.0.beta1 rspec-core/spec/rspec/core/failed_example_notification_spec.rb
opal-connect-rspec-0.5.0 rspec-core/spec/rspec/core/failed_example_notification_spec.rb
opal-rspec-0.5.0 rspec-core/spec/rspec/core/failed_example_notification_spec.rb
opal-rspec-0.5.0.beta3 rspec-core/spec/rspec/core/failed_example_notification_spec.rb
opal-rspec-0.5.0.beta2 rspec-core/spec/rspec/core/failed_example_notification_spec.rb
opal-rspec-0.5.0.beta1 rspec-core/spec/rspec/core/failed_example_notification_spec.rb