title: Undefined local variable or method 'current_user' (rails)
body: <p>I am testing my project, it is about application_helper.rb that contain this method :</p>
  
  <pre><code>def delete_link table=""
          if current_user.role.name=="Admin" || current_user.role.name=="Pemilik"
              link_to 'Hapus', table, :confirm =&gt; 'Anda yakin?', :method =&gt; :delete
          end
      end
  </code></pre>
  
  <p>I want to testing that method, so I make this testing on my customers_controller_test.rb like this</p>
  
  <pre><code>require 'test_helper'
  
  class CustomersControllerTest &lt; ActionController::TestCase
    include Devise::TestHelpers
    include ApplicationHelper
    setup do
      @permission = Permission.create(:name=&gt;"Customer")
      @role = Role.create(:name=&gt;"Admin")
      @user = User.create(:name=&gt;"Admin", :role_id =&gt; 1, :email =&gt; "email@email.email", :password =&gt; "123456")
      @role_permission = RolePermission.create(:role_id=&gt;@role.id, :permission_id=&gt;@permission.id, :access=&gt;2)
      @customer = FactoryGirl.create(:customer)
  
      sign_in @user    
    end
  
    test "should link to delete" do
      puts assert sign_in @user
      current_user = @user
      puts current_user.name
      puts current_user.role.name
      assert delete_link(customer_path(@customer.id))
      puts "2"
    end
  end
  </code></pre>
  
  <p>But I got Undefined local variable or method 'current_user'. Any idea? Thx for ur advice :)</p>