[rspec-users] Not able to run tests on rails

Nadal node.js99 at gmail.com
Sat May 22 20:42:34 EDT 2010

This is what I did. Please tell me where did I go wrong.

# I am using rails 2.3.5
rails demo
cd demo
ruby script/generate scaffold User name:string
rake db:migrate
rake db:test:prepare

ruby script/plugin install git://github.com/dchelimsky/rspec.git -r
ruby script/plugin install git://github.com/dchelimsky/rspec-rails.git
-r 'refs/tags/1.2.9'

mkdir spec/models

touch spec/models/user_test.rb

# this is the contents of user_test.rb
require File.dirname(__FILE__) + '/../spec_helper'
describe User do
  before(:each) do
    @user = User.new
  describe "attributes" do
    it "should be valid" do
      @user.should be_valid

# then I ran test and nothing happen. The output is blank.
rake spec:models

More information about the rspec-users mailing list