Skip to content
Snippets Groups Projects
Commit 6384816f authored by Thong Kuah's avatar Thong Kuah
Browse files

Fix specs to pass keyword arguments correctly

parent 1535f1ae
No related branches found
No related tags found
1 merge request!48407[RUN AS-IF-FOSS] Autocorrect LastKeywordArgument for specs
......@@ -116,7 +116,7 @@ def stub_action_name(value)
Time.use_zone('UTC') { example.run }
end
def element(*arguments)
def element(**arguments)
@time = Time.zone.parse('2015-07-02 08:23')
element = helper.time_ago_with_tooltip(@time, **arguments)
......
......@@ -15,7 +15,7 @@
describe '#run!' do
shared_examples_for 'moves the file' do
shared_examples_for 'a real run' do
let(:args) { [dry_run: false] }
let(:args) { { dry_run: false } }
it 'moves the file to its proper location' do
subject.run!(**args)
......@@ -49,25 +49,25 @@
end
context 'when dry_run is false' do
let(:args) { [dry_run: false] }
let(:args) { { dry_run: false } }
it_behaves_like 'a real run'
end
context 'when dry_run is nil' do
let(:args) { [dry_run: nil] }
let(:args) { { dry_run: nil } }
it_behaves_like 'a real run'
end
context 'when dry_run is true' do
let(:args) { [dry_run: true] }
let(:args) { { dry_run: true } }
it_behaves_like 'a dry run'
end
context 'with dry_run not specified' do
let(:args) { [] }
let(:args) { {} }
it_behaves_like 'a dry run'
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment