Sha256: 7df5723b42c60b96030d520ee78d696a3c6cd186fd6468ba840b522dfe734ff0

Contents?: true

Size: 694 Bytes

Versions: 2

Compression:

Stored size: 694 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'
require 'punchlist'
require 'punchlist/offense'

# Example use from https://github.com/apiology/pronto-punchlist

describe Punchlist do
  subject(:offenses) do
    ::Punchlist::Inspector.new(punchlist_line_regexp, path).run
  end

  let(:punchlist_line_regexp) do
    Regexp.new(::Punchlist::Config.default_punchlist_line_regexp_string)
  end
  let(:path) { 'feature/samples/mixed_types_of_source_files/lib/bar.scala' }

  it 'stays compatible with use by pronto-spec' do
    expect(offenses.length).to eq(1)
    offenses.each do |offense|
      expect(offense.filename).to eq(path)
      expect(offense.line_num).to eq(1)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
punchlist-1.3.2 feature/pronto_punchlist_use_spec.rb
punchlist-1.3.1 feature/pronto_punchlist_use_spec.rb