Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move acceptance tests to integration for minitest-rails support

  • Loading branch information...
commit d9d33b379ca2ba75654686c40344b9e58b1638e9 1 parent bbbf545
@proglottis authored
View
4 Guardfile
@@ -1,7 +1,7 @@
guard 'minitest' do
watch(%r|^test/minitest_helper\.rb|) { "test" }
- watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/acceptance/#{m[1]}_test.rb" }
- watch(%r|^app/views/(.*)/|) { |m| ["test/acceptance/#{m[1]}_controller_test.rb", "test/mailers/#{m[1]}_test.rb"] }
+ watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/integration/#{m[1]}_test.rb" }
+ watch(%r|^app/views/(.*)/|) { |m| ["test/integration/#{m[1]}_controller_test.rb", "test/mailers/#{m[1]}_test.rb"] }
watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" }
watch(%r|^app/models/(.*)\.rb|) { |m| "test/models/#{m[1]}_test.rb" }
end
View
6 test/acceptance/games_controller_test.rb → test/integration/games_controller_test.rb
@@ -1,6 +1,6 @@
require "minitest_helper"
-describe "GamesController Acceptance Test" do
+describe "GamesController Integration Test" do
before do
@service = login_service
@@ -33,8 +33,8 @@
describe "confirming" do
before do
@game = create(:game, :tournament => @tournament)
- @game_rank1 = @game.game_ranks.create(attributes_for(:game_rank, :user => @rating1.user, :position => 1))
- @game_rank2 = @game.game_ranks.create(attributes_for(:game_rank, :user => @rating2.user, :position => 2))
+ @game_rank1 = create(:game_rank, :game => @game, :user => @rating1.user, :position => 1)
+ @game_rank2 = create(:game_rank, :game => @game, :user => @rating2.user, :position => 2)
end
it "must be confirmed" do
View
2  test/acceptance/invites_controller_test.rb → test/integration/invites_controller_test.rb
@@ -1,6 +1,6 @@
require "minitest_helper"
-describe "InvitesController Acceptance Test" do
+describe "InvitesController Integration Test" do
before do
@service = login_service
View
2  test/acceptance/sessions_controller_test.rb → test/integration/sessions_controller_test.rb
@@ -1,6 +1,6 @@
require "minitest_helper"
-describe "SessionsController Acceptance Test" do
+describe "SessionsController Integration Test" do
before do
@omniauth = OmniAuth.config.add_mock(:developer, "info" => {"name" => "Bob Bobson", "email" => "bob@bob.com"})
View
2  ...acceptance/tournaments_controller_test.rb → ...ntegration/tournaments_controller_test.rb
@@ -1,6 +1,6 @@
require "minitest_helper"
-describe "TournamentsController Acceptance Test" do
+describe "TournamentsController Integration Test" do
before do
@service = login_service
View
6 test/minitest_helper.rb
@@ -29,6 +29,12 @@ def login_service
end
end
+class ActionDispatch::IntegrationTest
+ include Rails.application.routes.url_helpers
+ include Capybara::RSpecMatchers
+ include Capybara::DSL
+end
+
# Do you want all existing Rails tests to use MiniTest::Rails?
# Comment out the following and either:
# A) Change the require on the existing tests to `require "minitest_helper"`
Please sign in to comment.
Something went wrong with that request. Please try again.