June 10th, 2009 by fugufish
I come to PMA from a large corporation over 40,000 employees strong, including an entire army of QA Engineers testing every change and release we made, something we took full advantage of. At first, I was of the opinion (as many BDD converts) that the process of defining the and testing the code before actually writing the code would slow me down. As I moved more and more to BDD however, I found that I was completing tasks faster. The time saved comes from the ability to define how you expect your application to work. By doing this you will find that your actual code requires much less debugging. Things just seem to work. It continuously surprises me using BDD that things just work, so instead of spending hours looking for a mistyped association, I can spend those hours in actually coding.
Even with an army of QA Engineers, some bugs will sneak through. QA time on untested code takes longer, and debugging the code even longer than that. The release process can go from a day to several days, or even weeks.
With BDD, when new features are added to the application, it as easy as running your spec or test suite to ensure that the original functionality is undamaged. It of course seems like a no brainer to me now. It’s like looking back and remembering when you thought the world was flat, and seeing how narrow minded you were. The moral of the story? Test before you code! You fill find yourself with more time, and less headaches.
June 8th, 2009 by fugufish
Next install the Celerity gem in jRuby (we are using the github version rather than the ruby forge version, as it provides a later version):
jruby -S gem install jarib-celerity --source=http://gems.github.com
Now install the Culerity gem. This provides the interface between Celerity and your environment without forcing you to run in jRuby
gem install langalex-culerity --source http://gems.github.com
Place this in your test environment:
config.gem "langalex-culerity", :lib => false
:lib => false here to avoid loading the gem. This is done in the file generated by culerity. Finally remove
features/steps/webrat_steps.rb as it will conflict with Culerity, and run:
Enjoy! Culerity should have very similar syntax to webrat, however keep in mind you may see some differences that you may need to adjust.
April 3rd, 2009 by Alan Carl Mitchell
This tutorial assumes that you have ruby, rails, and mysql installed on your machine. This tutorial also doesn’t explain much about RSpec or Factory Girl and will just show you a quick way to get them working in a RoR environment.
Read the rest of this entry »