Sha256: 0ef7ee70d41736ec009cdbb52464c6f4f57a3dbda168316f314f047f00ed1b33

Contents?: true

Size: 467 Bytes

Versions: 23

Compression:

Stored size: 467 Bytes

Contents

require 'test_helper_dummy'

module UsersControllerTests
  extend ActiveSupport::Concern
  included do

    it 'works' do  
      get :index
      assert_select 'h1', "All #{User.count} Users"
    end

    it 'redirects' do
      put :update, :id => 0
      assert_redirected_to users_url
    end
    
  end
end

class UsersControllerTest < ActionController::TestCase
  include UsersControllerTests
end

describe UsersController do
  include UsersControllerTests
end

Version data entries

23 entries across 23 versions & 2 rubygems

Version Path
minitest-spec-rails-4.7.3 test/dummy_tests/users_controller_test.rb
minitest-spec-rails-4.7.2 test/dummy_tests/users_controller_test.rb
minitest-spec-rails-4.7.1 test/dummy_tests/users_controller_test.rb