In my Dashboard#Index, I have this:
def index
tagged_nodes = Node.includes(:user_tags).tagged_with(current_user.email)
end
How do I test this with RSpec?
I tried:
expect(assigns(tagged_nodes)).to match Node.includes(:user_tags).tagged_with(u1.email)
But that gives me this error:
NameError:
undefined local variable or method `tagged_nodes' for #<RSpec::ExampleGroups::DashboardController::GETIndex:0x007fe4edd7f058>