My latest exercise is to update the
restful-authentication Rails plugin to generate
Cucumber features instead of RSpec stories.
There is already a
Lighthouse ticket open for this, so I guess I'm not the first one to think of it.
The first steps make sure that restful-authentication is set up correctly:
- Create an empty Rails application
- Put in version control (git init, git add ., git commit -a -m "init")
- Add plugins as shown on the Cucumber Rails wiki page
- Add my fork of restful-authentication in the same manner
- Complete the restful-authentication installation per the directions
- Create the database tables (rake db:migrate)
- Run the RSpec stories (stories\rest_auth_stories.rb)
Stories won't even run, let alone pass! I'm not going to show all the errors along the way, but the steps to get to passing stories were:
- Added AthenticatedSystem into ApplicationController with the following 2 lines:
include AuthenticatedSystem
helper :all # include all helpers, all the time
- Uncommented the routes.rb map.root line(map.root :controller => "welcome")
- Removed line 1 of user_steps.rb (require File.dirname(__FILE__) + '/../helper')
- Created a minimal WelcomeController with an index method
- Created a minimal layout
16 scenarios: 16 succeeded, 0 failed, 0 pending
Hurrah!
No comments :
Post a Comment