Skip to content

Commit

Permalink
Fix a whole bunch of Ruby 1.8.7 bugs
Browse files Browse the repository at this point in the history
There are still 4 test failures:

* rspec ./spec/fpm/package/rpm_spec.rb:297 # FPM::Package::RPM#output package attributes should have the correct 'after_target_uninstall' trigger script
* rspec ./spec/fpm/package/rpm_spec.rb:288 # FPM::Package::RPM#output package attributes should have the correct 'before_uninstall' trigger script
* rspec ./spec/fpm/package/rpm_spec.rb:279 # FPM::Package::RPM#output package attributes should have the correct 'after_install' trigger script
* rspec ./spec/fpm/package/rpm_spec.rb:270 # FPM::Package::RPM#output package attributes should have the correct 'before_install' trigger script
  • Loading branch information
jordansissel committed Oct 25, 2014
1 parent 1045bf9 commit 8360d17
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions spec/fpm/command_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,22 @@

context "when not given" do
it "should not raise an exception" do
subject.parse([*args])
subject.parse(args)
end
end
context "when given a valid log level" do
it "should not raise an exception" do
subject.parse([*args, "--log", "error"])
subject.parse([*args, "--log", "warn"])
subject.parse([*args, "--log", "info"])
subject.parse([*args, "--log", "debug"])
subject.parse(args + ["--log", "error"])
subject.parse(args + ["--log", "warn"])
subject.parse(args + ["--log", "info"])
subject.parse(args + ["--log", "debug"])
end
end
context "when given an invalid log level" do
it "should raise an exception" do
insist { subject.parse([*args, "--log", ""]) }.raises FPM::Package::InvalidArgument
insist { subject.parse([*args, "--log", "whatever"]) }.raises FPM::Package::InvalidArgument
insist { subject.parse([*args, "--log", "fatal"]) }.raises FPM::Package::InvalidArgument
insist { subject.parse(args + ["--log", ""]) }.raises FPM::Package::InvalidArgument
insist { subject.parse(args + ["--log", "whatever"]) }.raises FPM::Package::InvalidArgument
insist { subject.parse(args + ["--log", "fatal"]) }.raises FPM::Package::InvalidArgument
end
end
end
Expand Down

0 comments on commit 8360d17

Please sign in to comment.