On 17-mrt-2008, at 14:51, Zach Dennis wrote:

> I have been putting helper methods inside of my own modules and then
> including them in RSpec::Story::World, which included in the context
> that stories are defined and run in (David, feel free to correct me if
> this is not 100% accurate).

>
Hmm, maybe I should clarify some more..

Imagine the following, untested, proof-of-idea code:

steps_for(:adding_posts) do
   def valid_post
     { :title => 'My First Post' }
   end
end

steps_for(:common) do
   Given "a valid post" do
     post "/posts/create", post => valid_post
   end
end

valid_post is not defined for steps_for(:common).

regards,
bartz
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to