DKR
2011-May-18 14:04 UTC
[rspec-users] Controller testing - it doesn''t print if given some print value
I am working on Rspec2.5.0 with rails 3.0.6 . And I was successfully able to complete model testing. But when I come to controller part I wanted to see whether some variable getting generated & I have given My Controller def some_action @users=User.create(params[:user]) p @users end end Here in model if give ''p object_name'' it prints well.But I am not able to see the results when I do bin/rspec spec/controllers/ user_controller_spec.rb Any ideas will be highly appreciable.
Andrew Wagner
2011-May-21 11:08 UTC
[rspec-users] Controller testing - it doesn''t print if given some print value
What does your actual spec look like? On Wed, May 18, 2011 at 10:04 AM, DKR <divyakr1985 at gmail.com> wrote:> I am working on Rspec2.5.0 with rails 3.0.6 . And I was successfully > able to complete model testing. But when I come to controller part I > wanted to see whether some variable getting generated & I have given > > My Controller > def some_action > @users=User.create(params[:user]) > p @users > end > end > > Here in model if give ''p object_name'' it prints well.But I am not able > to see the results when I do bin/rspec spec/controllers/ > user_controller_spec.rb > > Any ideas will be highly appreciable. > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20110521/7b9f3828/attachment.html>