On Mon, Jun 10, 2013 at 4:39 AM, oliver <[email protected]> wrote:
> def new
> @user_mst = UserMst.new
> @group_mst = GroupMst.all
>
Under normal circumstances, this line ^^ would assign @group_mst an empty
collection, not nil, so something is wrong with the way things are set
up/configured.
What happens if you stub GroupMst.all in the spec:
GroupMst.stub(:all => [])
Please try that and then run just one example like this:
rspec spec/views/user_msts/new.html.erb_spec.rb:18 --backtrace
And then post the complete output.
>
> respond_to do |format|
> format.html # new.html.erb
> format.xml { render :xml => @user_mst }
> end
> end
>
Those are the lines I include @group_mst.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users