Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/approvals/bin/action-error
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
 ZeroDivisionError  in runfile:2:in '/'
 ZeroDivisionError  in runfile:2:in 'Integer#/'
divided by 0

Prefix with DEBUG=1 for full backtrace
4 changes: 2 additions & 2 deletions spec/approvals/bin/syntax-error
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
 NameError  in runfile:1:in 'eval_code'
undefined local variable or method `nicely' for #<Runfile::Userfile name=nil, path="runfile">
 NameError  in runfile:1:in 'Runfile::Userfile#eval_code'
undefined local variable or method 'nicely' for an instance of Runfile::Userfile

Prefix with DEBUG=1 for full backtrace
4 changes: 2 additions & 2 deletions spec/approvals/integration/import/run spec
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
spec action
{:anything=>"Context Values"}
{"spec"=>true, "--continue"=>false, "--failed"=>false, "--help"=>false}
{anything: "Context Values"}
{"spec" => true, "--continue" => false, "--failed" => false, "--help" => false}
4 changes: 2 additions & 2 deletions spec/approvals/integration/import/run spec -fc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
spec action
{:anything=>"Context Values"}
{"spec"=>true, "--continue"=>true, "--failed"=>true, "--help"=>false}
{anything: "Context Values"}
{"spec" => true, "--continue" => true, "--failed" => true, "--help" => false}
4 changes: 2 additions & 2 deletions spec/approvals/integration/require-context/run server
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Context:
{:image=>"my-rails-app", :allow_deploy=>true, :env=>"development"}
{image: "my-rails-app", allow_deploy: true, env: "development"}
Args:
{"server"=>true, "deploy"=>false, "--help"=>false}
{"server" => true, "deploy" => false, "--help" => false}
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
2 changes: 1 addition & 1 deletion spec/runfile/bin_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe 'bin/run' do
let(:bin) { File.expand_path('bin/run', '../../../') }
let(:leeway) { RUBY_VERSION < '3.2.0' ? 0 : 33 }
let(:leeway) { RUBY_VERSION < '3.4.0' ? 52 : 0 }

context 'when the file contains a syntax error' do
it 'errors gracefully' do
Expand Down