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
‘refs/tags/1.2.9’
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
end
describe “attributes” do
it “should be valid” do
@user.should be_valid
end
end
end
then I ran test and nothing happen. The output is blank.
rake spec:models