Skip to content

Commit

Permalink
Merge pull request #425 from jeffcoat/validate_augeas_spec
Browse files Browse the repository at this point in the history
Fix off-by-one error in validate_augeas_spec.rb that was causing rspec failure

Even without the gem installed always, this is helpful to avoid errors should augeas be enabled/installed due to something else.
  • Loading branch information
DavidS committed Apr 10, 2015
2 parents 5ee6e96 + 3fec51a commit afec0ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/functions/validate_augeas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
end

describe "Nicer Error Messages" do
# The intent here is to make sure the function returns the 3rd argument
# The intent here is to make sure the function returns the 4th argument
# in the exception thrown
inputs = [
[ "root:x:0:0:root\n", 'Passwd.lns', [], 'Failed to validate passwd content' ],
Expand All @@ -69,7 +69,7 @@

inputs.each do |input|
it "validate_augeas(#{input.inspect}) should fail" do
expect { subject.call input }.to raise_error /#{input[2]}/
expect { subject.call input }.to raise_error /#{input[3]}/
end
end
end
Expand Down

0 comments on commit afec0ab

Please sign in to comment.