Passes if actual is an instance of `model_class` and returns `false` for `persisted?`. Typically used to specify instance variables assigned to views by controller actions
@example
get :new assigns(:thing).should be_a_new(Thing) post :create, :thing => { :name => "Illegal Value" } assigns(:thing).should be_a_new(Thing).with(:name => nil)
# File lib/rspec/rails/matchers/be_a_new.rb, line 70 def be_a_new(model_class) BeANew.new(model_class) end
Passes if actual returns `false` for `persisted?`.
@example
get :new assigns(:thing).should be_new_record
# File lib/rspec/rails/matchers/be_new_record.rb, line 17 def be_new_record BeANewRecord.new end