[rspec-users] Rspec not testing my callback

2010-11-15 Thread Andrew Davis
Hello everyone, I have a "before_save" at the top of my model, and it is being used correctly. However, when testing with RSpec/Rcov, my callback method is not being tested. Is there something specific I need to be doing? Thank you, Andrew Davis NASA - KSC -- Posted via http:

Re: [rspec-users] Rspec not testing my callback

2010-11-15 Thread Andrew Davis
server and observed that it DOES use the "save_product_groups" as it should be, but for some reason it's just not being covered in my rcov. Let me know if you need anything else. Please note that I'm still somewhat new to Rails. Thank you, Andrew Davis NASA - KSC -- Pos

Re: [rspec-users] Rspec not testing my callback

2010-11-15 Thread Andrew Davis
Worked like a charm. Thanks again Mr. Chelimsky -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Rspec not testing my callback

2010-11-15 Thread Andrew Davis
Thank you David for your prompt response. I completely understand what you're getting at regarding the posting of code as well. I think you may have solved my problem, I'll give it a go later today. I appreciate it! Thanks, Andrew Davis NASA - KSC -- Posted via http://www.ruby

[rspec-users] RSpec not testing ".sum"

2010-11-15 Thread Andrew Davis
Might I be missing something? rcov (0.9.9) rspec (1.3.0) rspec-rails (1.3.2) rails (2.3.8) ruby (1.8.7) Thanks in advance, Andrew Davis -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] RSpec not testing ".sum"

2010-11-15 Thread Andrew Davis
Scratch this. It has been noted that rcov has a hard time distinguishing what the last line is. If I put all of the code in that model on one line, it works great. Thanks! Andrew Davis -- Posted via http://www.ruby-forum.com/. ___ rspec-users

[rspec-users] Testing Controller 'show' action

2010-11-17 Thread Andrew Davis
an be viewed in this pastie: http://pastie.org/private/rn7vhzvmamn9tuytuuqq Please let me know if you need anything else! Thanks in advance! Andrew Davis -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] Testing Controller 'show' action

2010-11-18 Thread Andrew Davis
eed to pass to get a backtrace, that sounds extremely helpful! Thanks again for your thorough response! Thank you, Andrew Davis -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman

[rspec-users] Testing user_controller update action

2010-11-18 Thread Andrew Davis
ection, or inform me of something I may be doing wrong. Thanks! Andrew Davis -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Testing user_controller update action

2010-11-18 Thread Andrew Davis
Okay... Problem temporarily solved. Turns out it has to do with my before filter. I have: before_filter :authenticate_user! before_filter :set_conditions in the application controller. And: before_filter :authorize At the top of the users_controller. For some reason it works with those comme

Re: [rspec-users] Testing user_controller update action

2010-11-18 Thread Andrew Davis
To post a solution to my problem: describe "PUT 'update'" do before(:each) do User.should_receive(:find).with(:first, {:conditions=>{:id=>@user.id}}).and_return(@user) User.should_receive(:find).with(@user).and_return(@user) end . . . The first line is for the au

[rspec-users] Testing update, flash[:error]

2010-11-22 Thread Andrew Davis
quot;Name can't be blank" I've tried: flash[:error].should =~ /Name can't be blank/i Thank you in advance!! Andrew Davis -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] NestedIterator Assistance

2010-11-24 Thread Andrew Davis
thoughts on this? Thank you in advance! Andrew Davis -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] NestedIterator Assistance

2010-11-24 Thread Andrew Davis
Oops, it appears I've posted this in the wrong forum. I apologize. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] ActionController::RoutingError Assistance

2010-11-30 Thread Andrew Davis
r3oj1a8w Thank you! Andrew Davis -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] ActionController::RoutingError Assistance

2010-12-01 Thread Andrew Davis
I'm on Rails 2.3.8. A task order can have many criterion, and a criterion can have many evaluations. "/task_orders/24/criteria/13/evaluations/" Thanks! Andy -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge