public
Description: Rails tech talk
Homepage:
Clone URL: git://github.com/britt/tech-talk.git
britt (author)
Wed Jun 03 12:00:23 -0700 2009
commit  155f9cb66b72e73fd9b4479afb05bc340d230657
tree    13092aec1b4f8e84ccdcb8f63ee698209e724459
parent  d10874c5bbdb523ee600945fb49bc1f43f0a473d
README.mdown

Tech talk sample application

How to install Rails

  sudo gem install rails

Create the application

  rails url_shortener

Install the RSpec-Rails gem

Edit environments/test.rb and add the following

Then run

rake gems:install RAILS_ENV=test
script/generate rspec

If you are using Rubymine

  • Go to Project Settings > Ruby SDK and Gems
  • Click 'Attach gems'
    • Add Rspec
    • Add Rspec-rails

Model

Generate the Url model

script/generate rspec_model Url

Modify the generated migration to create the database schema

rake db:migrate db:test:prepare

Modify the generated model spec. Add tests for your model.

Controller

script/server