Displaying 1 result from an estimated 1 matches for "owned_account".
Did you mean:
owned_accounts
2012 Jun 08
0
Having difficulty testing redirects with Rspec and Capybara
...this error: @request must be an
ActionDispatch::Request
Any idea why? I''m using Rspec-Rails 2.9.0, Capybara 1.1.2, and Rails 3.2.
Here''s my test:
describe "AdminAccountPages" do
subject { page }
let(:user) { FactoryGirl.create(:user) }
let(:account) { user.owned_accounts.create!(name: "ACME Corp", subdomain:
"acme") }
describe "Admin::Accounts#show" do
context "as non-signed in user" do
before do
visit admin_account_url(account, host: get_host(account))
end
it "should redirect to the...