Skip to content

Commit

Permalink
add leeway to more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DannyBen committed Feb 5, 2025
1 parent f18c3ad commit b30e959
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/behaviors/runfile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
shared_examples 'a runfile' do |workspace, approvals_base|
command_file = 'commands.txt'
workspace_name = File.basename workspace
leeway = RUBY_VERSION < '3.4.0' ? 20 : 0 }
approvals_base ||= 'integration'

it 'runs as expected' do
Expand All @@ -28,7 +29,7 @@
if mode == :exception
expect { entrypoint.run }.to raise_approval(fixture_name).diff(4)
else
expect { entrypoint.run }.to output_approval fixture_name
expect { entrypoint.run }.to output_approval(fixture_name).diff(leeway)
end
rescue Runfile::ExitWithUsage => e
result = e.message
Expand Down

0 comments on commit b30e959

Please sign in to comment.