Displaying 1 result from an estimated 1 matches for "planscontrol".
Did you mean:
placecontrol
2012 Nov 12
7
RSpec: controller POST create
...validations of Plan
class Plan < ActiveRecord::Base
validates :give_take, :presence => true
validates :flight_name_id, :presence => true
validates :day_departure, :presence => true
validates :weight, :presence => true
end
The failure message is
1) PlansController POST create with valid params assigns a newly
created plan as @plan
Failure/Error: assigns(:plan).should be_persisted
expected persisted? to return true, got false
# ./spec/controllers/plans_controller_spec.rb:117:in `block (4
levels) in <top (required)>''
If my...