Sha256: e1b7102e1c4307bb70c7957eae0e78ffd8cf6cf99df54a685d0619b1eca51638

Contents?: true

Size: 452 Bytes

Versions: 3

Compression:

Stored size: 452 Bytes

Contents

describe CC::Service::Formatter do

  class TestFormatter < described_class
    def format_test
      message = message_prefix
      message << "This is a test"
    end
  end

  FakeService = Struct.new(:receive)

  it "supports passing nil as prefix" do
    formatter = TestFormatter.new(
      FakeService.new(:some_result),
      prefix: nil,
      prefix_with_repo: false,
    )

    expect(formatter.format_test).to eq("This is a test")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
codeclimate-services-1.11.4 spec/cc/service/formatter_spec.rb
codeclimate-services-1.11.3 spec/cc/service/formatter_spec.rb
codeclimate-services-1.11.2 spec/cc/service/formatter_spec.rb