Re: [rspec-users] ThreadError on click_button
Steve Scruggs wrote: > I get the following error > > ThreadError in 'Managing InvoicePayments viewing index lists all > InvoicePayments' > stopping only thread > note: use sleep to stop forever > (eval):2:in `click_button' > > when running rake spec using rspec and rspec-rails 1.2.9 and webrat > 0.5.3. I have tried webrat 0.6.rc1 with the same results. > > Here is the spec being executed: > require 'spec_helper' > > describe "Managing InvoicePayments" do > > describe "viewing index" do > it "lists all InvoicePayments" do > visit 'sessions/new' > fill_in "loginid", :with => "janepublic" > fill_in "password", :with => "janepub123" > click_button "Log in" > end > end > end > > > Any idea what could be causing this? Found the issue, had to monkey-patch actionpack/lib/action_controller/integration.rb with the following: app = Rack::Lint.new(@application) status, headers, body = app.call(env) + body.close if body.respond_to?(:close) + @request_count += 1 @html_document = nil -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] cucumber table diff haml problem
will do -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
Re: [rspec-users] cucumber table diff haml problem
Cucumber has its own mailing list now. Can you please post there? http://groups.google.com/group/cukes Aslak On Tue, Nov 3, 2009 at 2:01 PM, Ray K. wrote: > Inspired by the latest railscast I tried to do some table diffing: > > But my problem is that the haml generated table does not produce the > same html as the erb generated one. And table diffing seems to depend on > a rather specific html table format > > my table diff step: > [code] > Then /^I should see the (.+) table$/ do |table_id, expected_table| > html_table = table_at("##{table_id}").to_a > html_table.map! { |r| r.map! { |c| c.gsub(/<.+?>/, '') } } > expected_table.diff!(html_table) > end > [/code] > > > erb code and output: > [code] > > <% for client in @clients %> > > <%= client.name %> > <%= client.number %> > > <% end %> > > > > ## erb output > > > Client123 > 123 > > > Client222/td> > 222 > > [/code] > > > And the difference with HAML is this: > > [code] > %table#clients > - for client in @clients > %tr > %td > = client.name > %td > = client.number > > ##HAML output > > > Client123 > > > > 123 > > > [/code] > > > Any ideas how I can get table diff working without leaving HAML for ERB? > > Thx > Tick > > I hope this is readable, not sure if editing or bb is allowed here. > -- > Posted via http://www.ruby-forum.com/. > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users
[rspec-users] cucumber table diff haml problem
Inspired by the latest railscast I tried to do some table diffing: But my problem is that the haml generated table does not produce the same html as the erb generated one. And table diffing seems to depend on a rather specific html table format my table diff step: [code] Then /^I should see the (.+) table$/ do |table_id, expected_table| html_table = table_at("##{table_id}").to_a html_table.map! { |r| r.map! { |c| c.gsub(/<.+?>/, '') } } expected_table.diff!(html_table) end [/code] erb code and output: [code] <% for client in @clients %> <%= client.name %> <%= client.number %> <% end %> ## erb output Client123 123 Client222/td> 222 [/code] And the difference with HAML is this: [code] %table#clients - for client in @clients %tr %td = client.name %td = client.number ##HAML output Client123 123 [/code] Any ideas how I can get table diff working without leaving HAML for ERB? Thx Tick I hope this is readable, not sure if editing or bb is allowed here. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users