Introduce capybara and first feature spec (#1801)
This commit introduces Capybara and the first feature spec.
I focused on coverage for log in for the first feature spec because that would
have prevented 624a9a7136
causing #1236.
This commit is contained in:
parent
f5cd138323
commit
92cd207c50
4 changed files with 33 additions and 0 deletions
|
@ -7,6 +7,7 @@ require 'spec_helper'
|
|||
require 'rspec/rails'
|
||||
require 'webmock/rspec'
|
||||
require 'paperclip/matchers'
|
||||
require 'capybara/rspec'
|
||||
|
||||
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
|
||||
|
||||
|
@ -24,6 +25,11 @@ RSpec.configure do |config|
|
|||
config.include Devise::Test::ControllerHelpers, type: :controller
|
||||
config.include Devise::TestHelpers, type: :view
|
||||
config.include Paperclip::Shoulda::Matchers
|
||||
|
||||
config.before :each, type: :feature do
|
||||
https = ENV['LOCAL_HTTPS'] == 'true'
|
||||
Capybara.app_host = "http#{https ? 's' : ''}://#{ENV.fetch('LOCAL_DOMAIN')}"
|
||||
end
|
||||
end
|
||||
|
||||
RSpec::Sidekiq.configure do |config|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue