|
79 | 79 |
|
80 | 80 | context '.librarian' do |
81 | 81 | it 'puts a bad syntax librarian Puppet file in the error files hash' do |
82 | | - RubyParser.librarian(["#{fixtures_dir}librarian_syntax/Puppetfile"], false, []) |
83 | | - expect(PuppetCheck.files[:errors].keys).to eql(["#{fixtures_dir}librarian_syntax/Puppetfile"]) |
84 | | - expect(PuppetCheck.files[:errors]["#{fixtures_dir}librarian_syntax/Puppetfile"].join("\n")).to match(/^.*syntax error/) |
| 82 | + RubyParser.librarian(["#{fixtures_dir}librarian/Puppetfile_syntax"], false, []) |
| 83 | + expect(PuppetCheck.files[:errors].keys).to eql(["#{fixtures_dir}librarian/Puppetfile_syntax"]) |
| 84 | + expect(PuppetCheck.files[:errors]["#{fixtures_dir}librarian/Puppetfile_syntax"].join("\n")).to match(/^.*syntax error/) |
85 | 85 | expect(PuppetCheck.files[:warnings]).to eql({}) |
86 | 86 | expect(PuppetCheck.files[:clean]).to eql([]) |
87 | 87 | end |
88 | 88 | it 'puts a bad style librarian Puppet file in the warning files array' do |
89 | | - RubyParser.librarian(["#{fixtures_dir}librarian_style/Puppetfile"], true, []) |
| 89 | + RubyParser.librarian(["#{fixtures_dir}librarian/Puppetfile_style"], true, []) |
90 | 90 | expect(PuppetCheck.files[:errors]).to eql({}) |
91 | | - expect(PuppetCheck.files[:warnings].keys).to eql(["#{fixtures_dir}librarian_style/Puppetfile"]) |
92 | | - expect(PuppetCheck.files[:warnings]["#{fixtures_dir}librarian_style/Puppetfile"].join("\n")).to match(/Align the arguments.*\n.*Use the new/) |
| 91 | + expect(PuppetCheck.files[:warnings].keys).to eql(["#{fixtures_dir}librarian/Puppetfile_style"]) |
| 92 | + expect(PuppetCheck.files[:warnings]["#{fixtures_dir}librarian/Puppetfile_style"].join("\n")).to match(/Align the arguments.*\n.*Use the new/) |
93 | 93 | expect(PuppetCheck.files[:clean]).to eql([]) |
94 | 94 | end |
95 | 95 | it 'puts a bad style librarian Puppet file in the clean files array when rubocop_args ignores its warnings' do |
96 | | - RubyParser.librarian(["#{fixtures_dir}librarian_style/Puppetfile"], true, ['--except', 'Layout/ArgumentAlignment,Style/HashSyntax']) |
| 96 | + RubyParser.librarian(["#{fixtures_dir}librarian/Puppetfile_style"], true, ['--except', 'Layout/ArgumentAlignment,Style/HashSyntax']) |
97 | 97 | expect(PuppetCheck.files[:errors]).to eql({}) |
98 | 98 | expect(PuppetCheck.files[:warnings]).to eql({}) |
99 | | - expect(PuppetCheck.files[:clean]).to eql(["#{fixtures_dir}librarian_style/Puppetfile"]) |
| 99 | + expect(PuppetCheck.files[:clean]).to eql(["#{fixtures_dir}librarian/Puppetfile_style"]) |
100 | 100 | end |
101 | 101 | it 'puts a good librarian Puppet file in the clean files array' do |
102 | | - RubyParser.librarian(["#{fixtures_dir}librarian_good/Puppetfile"], true, []) |
| 102 | + RubyParser.librarian(["#{fixtures_dir}librarian/Puppetfile_good"], true, []) |
103 | 103 | expect(PuppetCheck.files[:errors]).to eql({}) |
104 | 104 | expect(PuppetCheck.files[:warnings]).to eql({}) |
105 | | - expect(PuppetCheck.files[:clean]).to eql(["#{fixtures_dir}librarian_good/Puppetfile"]) |
| 105 | + expect(PuppetCheck.files[:clean]).to eql(["#{fixtures_dir}librarian/Puppetfile_good"]) |
106 | 106 | end |
107 | 107 | end |
108 | 108 | end |
0 commit comments