search for: valid_sess

Displaying 1 result from an estimated 1 matches for "valid_sess".

Did you mean: valid_keys
2012 Nov 12
7
RSpec: controller POST create
...pec 2.11.1 I am new to rspec. I don''t quite understand tests for POST create part. I have generated scaffold, and simultaneously it generated controller_spec.rb as well. it "assigns a newly created plan as @plan" do post :create, {:plan => valid_attributes}, valid_session assigns(:plan).should be_a(Plan) assigns(:plan).should be_persisted end is the default POST create test. It raises a failure, if I changed the validations of Plan class Plan < ActiveRecord::Base validates :give_take, :presence => true validates :fli...