This repository contains code of my masterclass from the #rubyconfua 2010 (rubylang.org.ua).
The application is just a simple anonymous blog. It was made to just show right technics of BDD and TDD development.
Presentation can be found in this Git repository under /doc/. I added 3 versions:
Generating rails project
First thing we should do it's new project generation.
rails new articler -T
-T attribute used to skip standard rails tests generation. Actually we can even skip this attribute and just delete test/ folder from the project.
After that we need to modify our Gemfile. We need to add following lines:
group :development, :test do gem 'rspec-rails' gem 'shoulda' gem 'autotest-rails' gem 'factory_girl_rails' gem 'ffaker' gem 'webrat' end
We should add these gems to both :development and :test environments because we will use them with rake. And by default rake works with :development environment. Of cause, we can add them to :test only but in this case we'll need to run all our rake tasks using:
rake RAILS_ENV=test spec
And that's not useful.
OK, so what we just added. Let's talk shortly about each of them.
Here you can read about elements I used in the presentation.
I didn't finish this description yet but I'm working on it.