OS = CentOS-5.2 Ruby 1.8.6 Rails 2.2.0RC1 Cucumber 0.1.9 Webrat 0.3.2 I have asked about this on the RSpec list but I am repeating my request here to reach a somewhat wider audience. I am running a cucumber feature test that invokes webrat. The step is defined as follows: Given /I am on the new entity page/ do visits "/entities/new" end # rake features then generates the following error: Scenario: Register a new entity # features/manage_entities.feature:7 Given I am on the new entity page # features/steps/entity_steps.rb:1 wrong number of arguments (3 for 1) (ActionView::TemplateError) On line #10 of app/views/entities/new.html.erb 7: <% form_for(@entity) do |f| %> 8: 9: <%= render :partial => ''entities/entity_header'', 10: :object => @entity -%> 11: 12: <p> 13: <%= f.submit "Create" -%> vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_view/base.rb:13:in `render_partial'' This code actually works without error but I infer that I am tripping over some assumptions that webrat makes about views. Is what I have done wrong obvious to anyone here? Regards, -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Not sure if it is related, but with 2.2.0RC i had much better luck removing rspec and rspec_on_rails from the vendors folder and use the gems. I''m using these: rspec (1.1.11) rspec-rails (1.1.11) GL On Nov 12, 1:20 pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> OS = CentOS-5.2 > Ruby 1.8.6 > Rails 2.2.0RC1 > Cucumber 0.1.9 > Webrat 0.3.2 > > I have asked about this on the RSpec list but I am repeating my request > here to reach a somewhat wider audience. > > I am running a cucumber feature test that invokes webrat. The step is > defined as follows: > > Given /I am on the new entity page/ do > visits "/entities/new" > end > > # rake features then generates the following error: > > Scenario: Register a new entity # > features/manage_entities.feature:7 > Given I am on the new entity page # > features/steps/entity_steps.rb:1 > wrong number of arguments (3 for 1) (ActionView::TemplateError) > On line #10 of app/views/entities/new.html.erb > > 7: <% form_for(@entity) do |f| %> > 8: > 9: <%= render :partial => ''entities/entity_header'', > 10: :object => @entity -%> > 11: > 12: <p> > 13: <%= f.submit "Create" -%> > > vendor/plugins/rspec-rails/lib/spec/rails/extensions/action_view/base.rb:13:in > `render_partial'' > > This code actually works without error but I infer that I am tripping > over some assumptions that webrat makes about views. Is what I have > done wrong obvious to anyone here? > > Regards, > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Fredrik wrote:> Not sure if it is related, but with 2.2.0RC i had much better luck > removing rspec and rspec_on_rails from the vendors folder and use the > gems. I''m using these: > rspec (1.1.11) > rspec-rails (1.1.11) > > GL > > On Nov 12, 1:20�pm, James Byrne <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>BINGO! You know. I thought that I did that, removed both of them yesterday, and yet today I find that they are still there. I must have only removed them as submodules from git. But actually getting rid of them cleared up the problem for me. Now I just have regularly failing tests... Yea.... I think ;-> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---