After checking the first example, i noticed that this could not be correct :
describe "logged in user" do
it "should redirect the guest user to homepage" do
@user = User.create(:first_name => "Mike", :gender => "male")
request.session[:user_id] = @user.id
get :index
response.should be_success
end
end
as User require email and password field to be filled
After running Rspec i receive :
Finished in 2.2 seconds 84 examples, 37 failures
After checking the first example, i noticed that this could not be correct :
describe "logged in user" do it "should redirect the guest user to homepage" do @user = User.create(:first_name => "Mike", :gender => "male") request.session[:user_id] = @user.id get :index response.should be_success end end
as User require email and password field to be filled