Fixed the issue as soon as I walked off my desk.
Thought it was because of the resource object, @brand in spec/views/
parts/new.html.erb_spec.rb not being stubbed properly.

Checked and I was right :)

So,
  before(:each) do
    @brand = assign( :brand,
                        stub_model( Brand,
                          :name        => 'Apple',
                          :description => 'OS X and Ipods'
                        )
   )
  end

should have also had the ".as_new_record" method there. Reading below,
my view specs pass :)


    before(:each) do
        @brand = assign( :brand,
            stub_model( Brand,
                          :name        => 'Apple',
                          :description => 'OS X and Ipods'
            ).as_new_record
        )
    end


Case closed :)
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to