see below On 2 March 2012 03:33, S Ahmed <sahmed1...@gmail.com> wrote:
> I am not sure why my form submission is failing (request test). > > I am calling: > > # form is filled in a 'before do' block. > > it "should create an account" do > expect { click_button "Create" }.to change(Account, :count).by(1) > put a debugger statement here debugger 1 # so the debugger doesn't drop into rspec end > > Could I somehow view the HTML after the click_button call? > > Manually submitting the form works fine for me, so I'm confused. > > Now you can 1) Look at the html directly e.g. > page.body 2) Output the page.body in a pretty way perhaps using Coderay 3) Use irb to do all sorts of other thing Alternatively use capybara' save_and_open_page HTH Andrew
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users