Sha256: 064038910ab699fa521068ac09948b3a0f76bdf3ddca0258c084d216569b16e9

Contents?: true

Size: 608 Bytes

Versions: 26

Compression:

Stored size: 608 Bytes

Contents

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

26 entries across 26 versions & 1 rubygems

Version Path
cornucopia-0.1.40 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.39 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.38 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.37 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.36 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.35 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.34 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.33 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.32 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.31 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.30 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.29 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.28 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.26 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.25 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.24 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.23 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.22 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.21 spec/lib/util/report_formatters_spec.rb
cornucopia-0.1.20 spec/lib/util/report_formatters_spec.rb