mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-11-14 08:50:44 +00:00
Remove hacky before hook. Specify js: :true for javascript driver tests explicitly. Attempt to cache bundler on travis again.
This commit is contained in:
parent
4d3ba9e4d1
commit
5664dd7081
6 changed files with 8 additions and 18 deletions
|
@ -1,9 +1,7 @@
|
|||
language: ruby
|
||||
cache: bundler
|
||||
install: bundle install --jobs=3 --retry=3
|
||||
bundler_args: --jobs=3 --retry=3
|
||||
cache:
|
||||
directories:
|
||||
- vendor/bundle
|
||||
bundler: true
|
||||
addons:
|
||||
code_climate:
|
||||
repo_token: b3db5b7df9a0a1d0fd3503e72d7431ffbfa172492c2840d590ccb2fafd9172d3
|
||||
|
@ -15,4 +13,4 @@ before_script:
|
|||
- export DISPLAY=:99.0
|
||||
script:
|
||||
- RAILS_ENV=test bundle exec rake db:create db:migrate db:test:prepare
|
||||
- RAILS_ENV=test xvfb-run --server-args="-screen 0 1280x1024x24" bundle exec rspec spec
|
||||
- RAILS_ENV=test xvfb-run --server-args="-screen 0 1280x1024x24" bundle exec rspec spec
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'User creates new article' do
|
||||
feature 'User creates new article', js: :true do
|
||||
let!(:category) { create(:category, domain: Category::DOMAIN_NEWS) }
|
||||
let(:article) { attributes_for(:article) }
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'Google Calendar widget' do
|
||||
feature 'Google Calendar widget', js: :true do
|
||||
let(:events_list_json) { JSON.parse(File.read(Rails.root.join('spec/fixtures/google_calendar.json'))) }
|
||||
|
||||
before do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'Case insensitive login' do
|
||||
feature 'Case insensitive login', js: :true do
|
||||
let(:username) { "CaSe_InSeNsItIvE" }
|
||||
let(:password) { "passwordABC123" }
|
||||
let!(:user) { create(:user, username: username, raw_password: password) }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
require 'spec_helper'
|
||||
|
||||
feature 'Visitor signs up' do
|
||||
feature 'Visitor signs up', js: :true do
|
||||
let(:user) { attributes_for(:user) }
|
||||
|
||||
before do
|
||||
|
|
|
@ -18,7 +18,7 @@ Capybara.register_driver :poltergeist do |app|
|
|||
)
|
||||
end
|
||||
|
||||
Capybara.javascript_driver = :selenium
|
||||
Capybara.javascript_driver = :poltergeist
|
||||
|
||||
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
||||
|
||||
|
@ -31,12 +31,4 @@ RSpec.configure do |config|
|
|||
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
||||
config.order = 'random'
|
||||
config.use_transactional_fixtures = false
|
||||
|
||||
config.before(:each) do
|
||||
if example.metadata[:type] == :feature
|
||||
Capybara.current_driver = :poltergeist
|
||||
else
|
||||
Capybara.use_default_driver
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue