This repository has been archived by the owner on Jul 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 289
Stories
jeffrafter edited this page Aug 17, 2010
·
2 revisions
If you are trying to run the stories out of the box, keep in mind you need to have done all of the post install actions first. Also, you will need a root path in your routes, e.g., uncomment and add a welcome controller if you don’t already have one:
map.root :controller => "welcome"
Additionally, the stories expect you to have a default layout that includes div.notice and div.error for the flash messages:
<div id="flashes">
<div id="errors" class="error" style="display:none"><%= flash[:error] %></div>
<div id="notice" class="notice" style="display:none"><%= flash[:notice] %></div>
Once you have completed this, it is possible the stories will still not fully succeed. The stories assume fixture loading (which will reset the test database). Without this the checks for user_id: 4 will never succeed (in stories/users/sessions.story, you will see the following twice):
- assumes fixtures were run sometime
And her session store should have user_id: 4
I changed this to (in both places):
And her session store should have a new user_id
With that, you will need to add the matcher (I did this at line 94 in ra_response_steps.rb)
Then "$actor session store should have a new user_id" do |_|
session[:user_id].to_s.should eql(User.find(:last).id.to_s)
end