I'm trying to test logging in via http basic but am continually getting errors, I've uploaded the code here
I have http_basic_authenticate_with name: "name", password: "password"
in my application controller
My step definition for logging in is;
Given /^I login as admin$/ do
authorize "name", "password"
end
but it doesn't work and I get the error
expected there to be content "Posts" in "HTTP Basic: Access denied.\n"
(RSpec::Expectations::ExpectationNotMetError)
can someone tell me how to get cucumber/capybara to log in?