Reputation: 96544
I've tried p page
and p page.source
and also:
(rdb:1) find ('page') (rdb:1) find ('bosy') (rdb:1) find ('body') (rdb:1) find (rdb:1) p page (rdb:1) p html (rdb:1) p source (rdb:1) p page.source
but all I get is variations on:
*** Unknown command: "page". Try "help".
Code:
describe "For a user who is not logged in." do
context "Visiting the home page." do
before(:each) { visit root_path }
describe "The page." do
subject { page }
debugger
1
it "Has a 'login' link." do
should have_link('Sign In')
end
it "does NOT have a 'logout' link." do
should have_no_link('Logout')
end
end
end
end
Upvotes: 0
Views: 155
Reputation: 2099
Hm. I can't answer your question, but if you goal is to peek at the page, you could use
save_and_open_page
which requires the launchy gem in test & development scope.
(assuming you're using capybara?)
Upvotes: 1
Reputation: 12643
Where your current debugger
line is won't get executed in the scope where page
is defined. Maybe before(:each) { visit root_path; debugger }
would work. Completely untested.
Upvotes: 1