Testing

Test

--skip-test [-T]

Test will add a folder: test

When Test is disabled, generators.system_tests should be set to nil

# config/application.rb

require 'rails/test_unit/railtie'

class Application < Rails::Application
  config.generators.system_tests = nil
end
# Gemfile

group :test do
  gem 'capybara', '>= 2.15'
  gem 'selenium-webdriver'
  gem 'webdrivers'
end

System Test

--skip-system-test

System Test will add a folder: test/system

When System Test is disabled, generators.system_tests should be set to nil

# config/application.rb

class Application < Rails::Application
  config.generators.system_tests = nil
end
# test/application_system_test_case.rb

require 'test_helper'

class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
  driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
end
# Gemfile

group :test do
  gem 'capybara', '>= 2.15'
  gem 'selenium-webdriver'
  gem 'webdrivers'
end

Last updated