[rspec-users] Rails, rSpec edge problems

Ben Mabey ben at benmabey.com
Fri Oct 5 17:06:25 EDT 2007

Well, I am not even trying to include anything.  I basically have what 
all teh examples of the story runner have.  I can't seem to get the 
Story Runner to work with a simple example.  This is all it takes to 
make it fail on my app:

require File.join(File.dirname(__FILE__), "helper")
Story "Signin process", %{
  As a person
  I want to sign up for an account
  So that I can view and contribute content
}, :type => RailsStory do
  Scenario "An individual looking for support" do
    When "visiting the registration page at", "/signup" do |page|
      get page
    Then "viewer should see", "users/new" do |template|
      response.should render_template(template)


When I run this story ("ruby stories/signin_process.rb") I get the error:

NoMethodError: undefined method `render_template' for 

Any ideas?


Geoffrey Wiseman wrote:
> On 10/5/07, *Ben Mabey* <ben at benmabey.com <mailto:ben at benmabey.com>> 
> wrote:
>     Hi,
>     Does the Story Runner work on edge rails?  I thought that is what the
>     example app was using but I am on the latest Rails and latest rSpec
>     revisions and I am having problems. When I call 'render_template'
>     in a
>     story I get the following:
>     NoMethodError: undefined method `render_template' for
>     #<ActionController::Integration::Session:0x327d974>
>     Do I need to include something or why would this method not be found?
>     The full story is at: http://pastie.caboo.se/104247
> Actually, even without edge rails, I was having trouble mixing in a 
> module using include myself, got the same message above, but for a 
> different method.  Not sure if 'include' was having the desired effect 
> for me (although I found another path by doing the include in " 
> helper.rb" instead of inside the Scenario, which solved the problem 
> for me.
>   - Geoffrey
> -- 
> Geoffrey Wiseman
> ------------------------------------------------------------------------
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users

More information about the rspec-users mailing list