rubocop autofixed formatting

pull/29/head
Adam Townsend 2023-10-22 13:12:48 -07:00
parent 5abf07d0c7
commit 18e8eac2ab
1 changed files with 6 additions and 8 deletions

View File

@ -1,9 +1,10 @@
# frozen_string_literal: true
# BEFORE # BEFORE
Before('@db-test') do Before('@db-test') do
@links = Sequel.sqlite("db/#{ENV['DB_NAME']}")[:links] @links = Sequel.sqlite("db/#{ENV.fetch('DB_NAME', nil)}")[:links]
end end
# GIVEN # GIVEN
Given('I visit the {string} page') do |string| Given('I visit the {string} page') do |string|
@ -11,18 +12,17 @@ Given('I visit the {string} page') do |string|
end end
Given('A link already exists with the url {string}') do |string| Given('A link already exists with the url {string}') do |string|
@links.insert(url: string, code: "aaaaaa") @links.insert(url: string, code: 'aaaaaa')
end end
Given('A link already exists with the url {string} and code {string}') do |url, code| Given('A link already exists with the url {string} and code {string}') do |url, code|
@links.insert(url: url, code: code) @links.insert(url:, code:)
end end
# WHEN # WHEN
When('I click the {string} button') do |string| When('I click the {string} button') do |string|
click_button {string} click_button { string }
end end
When('I type {string} in the {string} field') do |text, field| When('I type {string} in the {string} field') do |text, field|
@ -33,7 +33,6 @@ When('I visit the {string} location') do |string|
visit string visit string
end end
# THEN # THEN
Then('I should see text {string}') do |string| Then('I should see text {string}') do |string|
@ -66,7 +65,6 @@ Then('The status code should be {int}') do |code|
page.status_code.should eq(code) page.status_code.should eq(code)
end end
# AFTER # AFTER
After('@db-test') do After('@db-test') do