Source code of the #rubyconfua 2010 masterclass
JavaScript Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
autotest
config
db
doc
lib/tasks
public
script
spec
vendor/plugins
.autotest
.gitignore
.rspec
Gemfile
Gemfile.lock
README.rdoc
Rakefile
config.ru

README.rdoc

Articler

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.

Entry

Presentation can be found in this Git repository under /doc/. I added 3 versions:

  • key

  • pdf

  • ppt

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.

1. rspec

2. shoulda

3. autotest-rails

4. factory_girl_rails

5. ffaker

6. webrat

Resources

Here you can read about elements I used in the presentation.

RSpec

Documentation: rdoc.info/github/dchelimsky/rspec rdoc.info/github/rspec/rspec-rails

Sources: github.com/rspec/rspec-rails

Shoulda

Documentation: rdoc.info/github/thoughtbot/shoulda

Sources: github.com/thoughtbot/shoulda

Factory Girl

Documentation: github.com/thoughtbot/factory_girl

Sources: github.com/thoughtbot/factory_girl_rails

FFaker

Documentation: rdoc.info/github/EmmanuelOga/ffaker

Sources: github.com/EmmanuelOga/ffaker/tree/master/lib/ffaker

Others

Autotest

github.com/seattlerb/autotest-rails

github.com/svoop/autotest-growl

Cucumber

cukes.info

TODO

I didn't finish this description yet but I'm working on it.

Contacts

SkypeID: lunich.dima

GTalk/Gmail: dima.lunich@gmail.com