Basic tests added
This commit is contained in:
parent
6239fb4dcb
commit
5498e9b9a4
8 changed files with 137 additions and 30 deletions
|
|
@ -10,10 +10,12 @@ Minitest::Reporters.use!
|
|||
|
||||
# To add Capybara feature tests add `gem "minitest-rails-capybara"`
|
||||
# to the test group in the Gemfile and uncomment the following:
|
||||
# require "minitest/rails/capybara"
|
||||
require "minitest/rails/capybara"
|
||||
require 'capybara/rails'
|
||||
require 'capybara/minitest'
|
||||
|
||||
# Uncomment for awesome colorful output
|
||||
# require "minitest/pride"
|
||||
require "minitest/pride"
|
||||
|
||||
class ActiveSupport::TestCase
|
||||
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
||||
|
|
@ -22,4 +24,19 @@ end
|
|||
|
||||
class ActionController::TestCase
|
||||
include Devise::Test::ControllerHelpers
|
||||
end
|
||||
end
|
||||
|
||||
# Capybara-based tests
|
||||
class ActionDispatch::IntegrationTest
|
||||
# Make the Capybara DSL available in all integration tests
|
||||
include Capybara::DSL
|
||||
# Make `assert_*` methods behave like Minitest assertions
|
||||
include Capybara::Minitest::Assertions
|
||||
|
||||
# Reset sessions and driver between tests
|
||||
# Use super wherever this method is redefined in your individual test classes
|
||||
def teardown
|
||||
Capybara.reset_sessions!
|
||||
Capybara.use_default_driver
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue