code style updates
This commit is contained in:
parent
8350c78823
commit
2528d335d4
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# rubocop:disable RSpec/Capybara/SpecificMatcher
|
||||
|
||||
Capybara::SpecHelper.spec '#has_css?' do
|
||||
before do
|
||||
@session.visit('/with_html')
|
||||
|
@ -373,3 +375,5 @@ Capybara::SpecHelper.spec '#has_no_css?' do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
# rubocop:enable RSpec/Capybara/SpecificMatcher
|
||||
|
|
|
@ -3,31 +3,32 @@
|
|||
require 'spec_helper'
|
||||
|
||||
RSpec.describe Capybara::Server::Middleware::Counter do
|
||||
let(:counter) { Capybara::Server::Middleware::Counter.new }
|
||||
let(:counter) { described_class.new }
|
||||
let(:uri) { '/example' }
|
||||
|
||||
context '#increment' do
|
||||
describe '#increment' do
|
||||
it 'successfully' do
|
||||
counter.increment(uri)
|
||||
expect(counter.positive?).to be true
|
||||
expect(counter).to be_positive
|
||||
end
|
||||
end
|
||||
|
||||
context 'decrement' do
|
||||
describe '#decrement' do
|
||||
before do
|
||||
counter.increment(uri)
|
||||
expect(counter.positive?).to be true
|
||||
end
|
||||
|
||||
context 'successfully' do
|
||||
it 'with same uri' do
|
||||
expect(counter).to be_positive
|
||||
counter.decrement(uri)
|
||||
expect(counter.positive?).to be false
|
||||
expect(counter).not_to be_positive
|
||||
end
|
||||
|
||||
it 'with changed uri' do
|
||||
expect(counter).to be_positive
|
||||
counter.decrement('/')
|
||||
expect(counter.positive?).to be false
|
||||
expect(counter).not_to be_positive
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ def ensure_selenium_running!
|
|||
rescue StandardError
|
||||
if timer.expired?
|
||||
raise 'Selenium is not running. ' \
|
||||
"You can run a selenium server easily with: \n" \
|
||||
"You can run a selenium server easily with: \n. " \
|
||||
'$ docker-compose up -d selenium_firefox'
|
||||
else
|
||||
puts 'Waiting for Selenium docker instance...'
|
||||
|
|
Loading…
Reference in New Issue