-
Notifications
You must be signed in to change notification settings - Fork 54
Whenbot Channel Creation Guide
Please note that this page is a work in progress. In the meanwhile, please feel free to ask any questions in the Google Group or via email. Check back later for updates and additional instructions.
It's not as hard as you may think. Follow this guide:
- Text: http://asciicasts.com/episodes/245-new-gem-with-bundler
- RailsCasts Video: http://railscasts.com/episodes/245-new-gem-with-bundler
See the folder layout in the lib/channels/developer
Channel in the Whenbot App repository.
If you're not on the "Test Driven Development" (TDD) train yet, now's your chance! TDD development is highly encouraged for all parts of Whenbot.
You can pretty much use whatever testing setup you prefer, but here's some suggestions:
- Test::Unit
- FactoryGirl (to replace fixtures)
- Mocha (for mocking and stubbing)
- Shoulda (for contexts)
To get started, you'll need to set the proper dependencies for your gem.
Use the s.add_development_dependency
command to add the above gems.
Side-Note: There's a potential gotcha with Test::Unit that you may or may not encounter: Ruby 1.9 no longer includes Test::Unit. it uses minitest instead. So, if you happen to notice that your error messages for your failing tests aren't particularly helpful, you're probably using minitest.
To fix this, install the test-unit
gem and add it to your dependencies.
This may only apply to your normal app development though.
See the sample code in the lib/channels/developer
Channel in the Whenbot App repository.