From 1537d921bd2230a52735ab76e16a485c4e876b02 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 26 Oct 2017 19:31:25 +0300 Subject: [PATCH 1/2] Update minitest gem --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index bd372118f..6e55221b9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -267,7 +267,7 @@ GEM open4 (~> 1.3.4) rake mini_portile2 (2.3.0) - minitest (5.10.2) + minitest (5.10.3) monetize (1.6.0) money (~> 6.8) money (6.8.3) From 5e9862cdd6eb379424d587015a14c73239797528 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 26 Oct 2017 19:31:53 +0300 Subject: [PATCH 2/2] Add minitest config --- config/application.rb | 6 +----- test/test_helper.rb | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 test/test_helper.rb diff --git a/config/application.rb b/config/application.rb index 71920f3ea..13d0c73ef 100644 --- a/config/application.rb +++ b/config/application.rb @@ -60,11 +60,7 @@ module Registry g.helper false g.template_engine :erb g.jbuilder false - g.test_framework :rspec, - controller_specs: false, - view_specs: false, - request_specs: false, - routing_specs: false + g.test_framework :minitest, fixture: false end registrant_portal_uri = URI.parse(ENV['registrant_url']) diff --git a/test/test_helper.rb b/test/test_helper.rb new file mode 100644 index 000000000..55d51cd4c --- /dev/null +++ b/test/test_helper.rb @@ -0,0 +1,20 @@ +ENV['RAILS_ENV'] ||= 'test' +require File.expand_path('../../config/environment', __FILE__) +require 'rails/test_help' +require 'capybara/rails' +require 'capybara/minitest' + +class ActiveSupport::TestCase + include FactoryGirl::Syntax::Methods +end + +class ActionDispatch::IntegrationTest + include Warden::Test::Helpers + include Capybara::DSL + include Capybara::Minitest::Assertions + + def teardown + Capybara.reset_sessions! + Capybara.use_default_driver + end +end