Skip to content

Commit 5f80b77

Browse files
committed
(MAINT) Fix spec test paths
Prior to this commit a number of spec tests were failing. This was because tests were expecting files to exist in the previous location. Some could not load `spec_helper` and others were referencing a path that no longer existed. This commit fixes the rspec filter in `spec_helper` so that it properly includes all of the unit tests and updates the expected paths in `bin_spec`.
1 parent 0011474 commit 5f80b77

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def subject
134134
config.include(
135135
RSpec::LintExampleGroup,
136136
type: :lint,
137-
file_path: Regexp.compile(['spec', 'puppet-lint', 'plugins'].join('[\\\/]')),
137+
file_path: Regexp.compile(['spec', 'unit', 'puppet-lint', 'plugins'].join('[\\\/]')),
138138
)
139139

140140
config.expect_with(:rspec) do |c|

spec/unit/puppet-lint/bin_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ def initialize(args)
587587

588588
context 'and command-line does not override "--only-checks"' do
589589
let(:args) do
590-
File.join(File.dirname(__FILE__), '..', 'fixtures', 'test', 'manifests', 'two_warnings.pp')
590+
File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'test', 'manifests', 'two_warnings.pp')
591591
end
592592

593593
its(:exitstatus) { is_expected.to eq(0) }
@@ -600,7 +600,7 @@ def initialize(args)
600600
let(:args) do
601601
[
602602
'--only-checks=variable_is_lowercase',
603-
File.join(File.dirname(__FILE__), '..', 'fixtures', 'test', 'manifests', 'two_warnings.pp'),
603+
File.join(File.dirname(__FILE__), '..', '..', 'fixtures', 'test', 'manifests', 'two_warnings.pp'),
604604
]
605605
end
606606

0 commit comments

Comments
 (0)