Commit 6384816f authored by Thong Kuah's avatar Thong Kuah

Fix specs to pass keyword arguments correctly

parent 1535f1ae
...@@ -116,7 +116,7 @@ RSpec.describe ApplicationHelper do ...@@ -116,7 +116,7 @@ RSpec.describe ApplicationHelper do
Time.use_zone('UTC') { example.run } Time.use_zone('UTC') { example.run }
end end
def element(*arguments) def element(**arguments)
@time = Time.zone.parse('2015-07-02 08:23') @time = Time.zone.parse('2015-07-02 08:23')
element = helper.time_ago_with_tooltip(@time, **arguments) element = helper.time_ago_with_tooltip(@time, **arguments)
......
...@@ -15,7 +15,7 @@ RSpec.describe Gitlab::Cleanup::ProjectUploads do ...@@ -15,7 +15,7 @@ RSpec.describe Gitlab::Cleanup::ProjectUploads do
describe '#run!' do describe '#run!' do
shared_examples_for 'moves the file' do shared_examples_for 'moves the file' do
shared_examples_for 'a real run' 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 it 'moves the file to its proper location' do
subject.run!(**args) subject.run!(**args)
...@@ -49,25 +49,25 @@ RSpec.describe Gitlab::Cleanup::ProjectUploads do ...@@ -49,25 +49,25 @@ RSpec.describe Gitlab::Cleanup::ProjectUploads do
end end
context 'when dry_run is false' do context 'when dry_run is false' do
let(:args) { [dry_run: false] } let(:args) { { dry_run: false } }
it_behaves_like 'a real run' it_behaves_like 'a real run'
end end
context 'when dry_run is nil' do context 'when dry_run is nil' do
let(:args) { [dry_run: nil] } let(:args) { { dry_run: nil } }
it_behaves_like 'a real run' it_behaves_like 'a real run'
end end
context 'when dry_run is true' do context 'when dry_run is true' do
let(:args) { [dry_run: true] } let(:args) { { dry_run: true } }
it_behaves_like 'a dry run' it_behaves_like 'a dry run'
end end
context 'with dry_run not specified' do context 'with dry_run not specified' do
let(:args) { [] } let(:args) { {} }
it_behaves_like 'a dry run' it_behaves_like 'a dry run'
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment