Sha256: 58b7b0bc45e2828dfa7c563a2e2ef6f062d763c184ef97612a0a180ee5efb89a

Contents?: true

Size: 639 Bytes

Versions: 17

Compression:

Stored size: 639 Bytes

Contents

# frozen_string_literal: true

require "rails_helper"
require ::File.expand_path("../../../lib/cornucopia/util/report_formatters", File.dirname(__FILE__))

describe Cornucopia::Util::CucumberFormatter do
  describe "#format_location" do
    it "formats the passed in object as #file.#line" do
      file_location = double(:file_location, file: Faker::Lorem.sentence, line: rand(1..500))
      expect(Cornucopia::Util::ReportBuilder).to receive(:pretty_format).and_call_original
      expect(Cornucopia::Util::CucumberFormatter.format_location(file_location)).
          to eq "#{file_location.file}:#{file_location.line}"
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
cornucopia-0.2.0 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.56 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.55 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.54 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.53 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.52 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.51 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.50 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.49 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.48 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.47 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.46 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.45 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.44 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.43 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.42 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.41 spec/lib/util/report_formatters_spec.rb