how can I test accepts_nested_attributes_for with Rspec Rails3

Viewed 10529

I have a model as follows:

class Greeting < ActiveRecord::Base

  attr_accessible :headline, :icon, :content

  belongs_to :user


  accepts_nested_attributes_for :user, :reject_if => proc { |a| a[:name].blank? || a[:email].blank? } 

How can I do an Rspec test for this?

2 Answers
Related