Topic: RSpec helper method spec test issue

I'm having a issue with a simple spec test and I'm assuming it's something really stupid as it usually is. I've got a view called dashboard.html.erb that has this among other code:


<% if admin? -%>
  <%= link_to "Edit Settings", edit_account_setting_url(current_account.account_setting) %>
<% end -%>

The admin? method:

def admin?
  logged_in? && current_user.admin?
end

I've tried a few different ways but can't get this test to past:


before(:each) do
  assigns[:current_account] = @account = Factory(:account)
  assigns[:current_user] = @user = Factory(:user, :admin => true)
  assigns[:profile] = @account.profile
  render "accounts/dashboard"
end

# this test fails
it "should render edit account setting link if admin user" do
  response.should have_tag("a[href=#{edit_account_setting_url(@account.account_setting)}]")
end

# this test passes  
it "should not render edit setting link if not admin user" do
  response.should_not have_tag("a[href=#{edit_account_setting_url(@account.account_setting)}]")
end

How would I got about testing this in dashboard.html.erb_spec.rb for admin and non admin users that are logged in?