Skip to content

Commit

Permalink
Better chdir nesting
Browse files Browse the repository at this point in the history
Co-authored-by: Orien Madgwick <497874+orien@users.noreply.github.com>
  • Loading branch information
viraptor and orien committed Mar 6, 2024
1 parent 50a58aa commit 8752fb4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions spec/stack_master/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@
end

it "gives explicit error on badly indented entries" do
begin
orig_dir = Dir.pwd
Dir.chdir './spec/fixtures/'
expect { StackMaster::Config.load!('stack_master_wrong_indent.yml') }.to raise_error StackMaster::Config::ConfigParseError
ensure
Dir.chdir orig_dir
Dir.chdir('./spec/fixtures/') do
expect { StackMaster::Config.load!('stack_master_wrong_indent.yml') }
.to raise_error StackMaster::Config::ConfigParseError
end
end

Expand Down

0 comments on commit 8752fb4

Please sign in to comment.