[rspec-users] Stubbing helper methods in controller specs when integrate_views is On

2009-11-25 Thread Krasimir Angelov
Hi all, I'm using rspec-caching-test-plugin to test caching (obviously) in my controller specs. Because views are also involved in caching integrate_views have to be turned On. The problem comes when mock is passed to a helper, for examle link_to_profile(profile) where porfile = mock_model(Profi

Re: [rspec-users] Introductory recommendations?

2009-11-25 Thread Carl Graff
I agree that mocks are one of the harder concepts to grasp. In my case - although I will probably get some flack - I created some simple real objects first, then tried to mimic their behavior with mocks. When you are first leaning sometimes I find it better to start with a known real object th

Re: [rspec-users] Introductory recommendations?

2009-11-25 Thread Pat Maddox
Pair with them. How big's the team? Lots of ways you can do this. If there are 5 other devs, you can pair with one each day, bam, training in a week. If there are 10, you pair with 5 for one week, then have those guys pair with the other guys over the next week (rotating every day). Does anybod

Re: [rspec-users] Introductory recommendations?

2009-11-25 Thread Matt Wynne
+1 And have a coding dojo ASAP. It's much easier to learn when you're having fun. On 25 Nov 2009, at 18:07, Pat Maddox wrote: Pair with them. How big's the team? Lots of ways you can do this. If there are 5 other devs, you can pair with one each day, bam, training in a week. If there are

[rspec-users] how to test a observer model?

2009-11-25 Thread Zhenning Guan
I have a user_observer, code like this: def after_create(user) UserMailer.deliver_signup_notification(user) user.random_key = random_key_method user.save end before do @user = mock_model(User) @user_observer = UserObserver.instance end UserMailer.should_receive(:deliver_signup_no

Re: [rspec-users] Un-recognised routes that do exist, using namespaces & subdomain checking

2009-11-25 Thread evanclosson
Was able to get past this testing issue for the moment. In the interest of time I dropped some example code on my site pending a more permanent solution. Hope it helps... http://www.evanclosson.com/devlog/testingrouteswithrspecandsubdomainfu On Nov 11, 7:55 am, David Chelimsky wrote: > On Wed,

Re: [rspec-users] undefined method `route_for

2009-11-25 Thread Amit Kulkarni
Amit Kulkarni wrote: > Ok Fine.That sounds to be a good idea. > Thanks Hi David, Good news,My routing scenarios are working now. I dont know how but it did.I was going to mail you the app but it is working fine now. -- Posted via http://www.ruby-forum.com/. __