spec/puppet-check/cli_spec.rb in puppet-check-1.6.1 vs spec/puppet-check/cli_spec.rb in puppet-check-2.0.0
- old
+ new
@@ -11,12 +11,12 @@
context '.parse' do
it 'raises an error if an invalid option was specified' do
expect { PuppetCheck::CLI.parse(%w[-s -f -asdf foo]) }.to raise_error(OptionParser::InvalidOption)
end
- it 'allows future parser, fail on warnings, style, smoke, and regression checks to be enabled' do
- expect(PuppetCheck::CLI.parse(%w[-f --fail-on-warnings -s -r --smoke foo])).to include(future_parser: true, fail_on_warnings: true, style_check: true, smoke_check: true, regression_check: true)
+ it 'allows fail on warnings, style, smoke, and regression checks to be enabled' do
+ expect(PuppetCheck::CLI.parse(%w[--fail-on-warnings -s -r --smoke foo])).to include(fail_on_warnings: true, style: true, smoke: true, regression: true)
end
it 'correctly parser EYAML options' do
expect(PuppetCheck::CLI.parse(%w[--public pub.pem --private priv.pem])).to include(public: 'pub.pem', private: 'priv.pem')
end
@@ -40,9 +40,9 @@
it 'correctly parses Rubocop arguments' do
expect(PuppetCheck::CLI.parse(%w[--rubocop rubocop-arg-one,rubocop-arg-two foo])).to include(rubocop_args: ['--except', 'rubocop-arg-one,rubocop-arg-two'])
end
it 'correctly parses multiple sets of arguments' do
- expect(PuppetCheck::CLI.parse(%w[-s -f --puppet-lint puppetlint-arg-one,puppetlint-arg-two --rubocop rubocop-arg-one,rubocop-arg-two foo])).to include(future_parser: true, style_check: true, puppetlint_args: ['--puppetlint-arg-one', '--puppetlint-arg-two'], rubocop_args: ['--except', 'rubocop-arg-one,rubocop-arg-two'])
+ expect(PuppetCheck::CLI.parse(%w[-s --puppet-lint puppetlint-arg-one,puppetlint-arg-two --rubocop rubocop-arg-one,rubocop-arg-two foo])).to include(style: true, puppetlint_args: ['--puppetlint-arg-one', '--puppetlint-arg-two'], rubocop_args: ['--except', 'rubocop-arg-one,rubocop-arg-two'])
end
end
end