Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoloader_layout test overly dependant on the name of the current directory #245

Closed
ghost opened this issue Jan 12, 2014 · 0 comments · Fixed by #252
Closed

autoloader_layout test overly dependant on the name of the current directory #245

ghost opened this issue Jan 12, 2014 · 0 comments · Fixed by #252

Comments

@ghost
Copy link

ghost commented Jan 12, 2014

About a year ago, b91d005 added a leading '/' to the expected path in the autoloader_layout test. This only works if the module that you're testing is in a directory with the same name as the module itself. It seems like this should not fail, but it does:

$ git clone https://github.com/puppetlabs/puppetlabs-ntp.git
$ cd puppetlabs-ntp
$ puppet-lint manifests/init.pp
manifests/init.pp:1:autoloader_layout:ERROR:ntp not in autoload module layout'

The commit that I referenced earlier fixed the problem that it described, but created this new issue.

The following test demonstrates the problem:

context 'foo::bar in rodjek-foo/manifests/bar.pp' do
  let(:code) { "class foo::bar { }" }
  let(:path) { 'rodjek-foo/manifests/bar.pp' }

  it 'should not detect any problems' do
    expect(problems).to have(0).problems
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0 participants