ruby on rails - Mocking an array in rspec -


The following code should be made to an array and should be sent as part of the parameter hash:

  Let's make "an outing" lambda post: create, {: outgoing => FactoryGirl.attributes_for (: outgoing) ,: guestvalue = & gt; ["80", "89"],: Barview = & gt; Instead, it is giving me the error:  
  No Methière error: Undefined method for zero [`] ': Null Class   

Parameter my controller Passed in this section of:

  parameter [: guest level] .each do | guest_id | @ outgoing. Add_guest (guest_id) and paramours [: barview] .each do | bar_id | @ Outing.add_bar (bar_id) End    

Still interested for anyone, here The proper syntax is to pass the array:

  POS T: Create, {: Outgoing => FactoryGirl.attributes_for (: outing) ,: guestvalue = & gt; ["80", "89"] ,: Barview => ["2976", "2973"] }    

Comments