Sha256: a1bb5c68a427398dad09da4955235117067e465a7d4b2d59e666a813f902dc1b

Contents?: true

Size: 506 Bytes

Versions: 1

Compression:

Stored size: 506 Bytes

Contents

require 'test_helper_dummy'

module UsersControllerTests
  def self.included(klass)
    klass.class_eval do

      before { get :index }

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

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

class UsersControllerTest < ActionController::TestCase
  include UsersControllerTests
end

describe UsersController do
  include UsersControllerTests
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
minitest-spec-rails-3.1.2 test/dummy_tests/users_controller_test.rb