mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Add feature testing support
This commit is contained in:
parent
eaa9b015e2
commit
d9240aa4f8
12 changed files with 123 additions and 37 deletions
|
@ -4,6 +4,7 @@ require 'spec_helper'
|
|||
require File.expand_path("../../config/environment", __FILE__)
|
||||
require 'rspec/rails'
|
||||
require 'shoulda/matchers'
|
||||
require 'capybara/poltergeist'
|
||||
|
||||
# Requires supporting ruby files with custom matchers and macros, etc, in
|
||||
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
||||
|
@ -39,6 +40,10 @@ RSpec.configure do |config|
|
|||
DatabaseCleaner.strategy = :truncation
|
||||
end
|
||||
|
||||
config.before(:each, js: true) do
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
DatabaseCleaner.start
|
||||
end
|
||||
|
@ -47,6 +52,8 @@ RSpec.configure do |config|
|
|||
DatabaseCleaner.clean
|
||||
end
|
||||
|
||||
Capybara.javascript_driver = :poltergeist
|
||||
|
||||
# RSpec Rails can automatically mix in different behaviours to your tests
|
||||
# based on their file location, for example enabling you to call `get` and
|
||||
# `post` in specs under `spec/controllers`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue