rubocop autofixed formatting
parent
5abf07d0c7
commit
18e8eac2ab
|
|
@ -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,14 +12,13 @@ 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|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue