Re: [rspec-users] Stubbing Sleep

2011-02-22 Thread James Martin
Thanks, Michael: That's a useful article. I attempted to emulate the example in RSpec but still found that stubbing sleep with any of the built in rspec-mocks wasn't working the way I hoped. I was probably doing something wrong. In the end I wrote a little module (Sleepy) that I can include in RS

Re: [rspec-users] Rake generate - not generating spec files

2011-02-22 Thread Pixel
On Tue, Feb 22, 2011 at 8:35 PM, Jason Nah wrote: > Howdy, > I'm running the following stack: > > rails 3.0.4 > rake (0.8.7) > rspec 2.5.0 > rspec-rails 2.5.0 > > I created the rails app, and I didn't tell rails to exclude the default Test > mechanisms. > I installed it using > rails generate rspe

Re: [rspec-users] Rake generate - not generating spec files

2011-02-22 Thread David Chelimsky
On Feb 22, 2011, at 8:35 PM, Jason Nah wrote: > Howdy, > > I'm running the following stack: > rails 3.0.4 > rake (0.8.7) > rspec 2.5.0 > rspec-rails 2.5.0 > I created the rails app, and I didn't tell rails to exclude the default Test > mechanisms. > > I installed it using > > rails generate rs

[rspec-users] Rake generate - not generating spec files

2011-02-22 Thread Jason Nah
Howdy, I'm running the following stack: - rails 3.0.4 - - rake (0.8.7) - rspec 2.5.0 - rspec-rails 2.5.0 I created the rails app, and I didn't tell rails to exclude the default Test mechanisms. I installed it using rails generate rspec:install When I type rake g model User I g

Re: [rspec-users] Stubbing Sleep

2011-02-22 Thread Michael Guterl
On Tue, Feb 22, 2011 at 6:13 AM, James Martin wrote: > I've recently been playing around with some code that re-runs a block until > either the block returns a non-false value, or a timeout expires: > https://gist.github.com/838520 > At first, I thought this was working, as I was just checking the

Re: [rspec-users] object_instance.reload and print out a message placed in the model

2011-02-22 Thread Justin Ko
On Tue, Feb 22, 2011 at 10:08 AM, Daniel Salmerón Amselem < daniel.amse...@gmail.com> wrote: > Thanks, I'll try that. I just have the feeling ActiveRecord caches are > being a pain in the ass. For example, the toggle_resource method removes or > adds a resource to a group, and when just after that

Re: [rspec-users] object_instance.reload and print out a message placed in the model

2011-02-22 Thread Daniel Salmerón Amselem
Thanks, I'll try that. I just have the feeling ActiveRecord caches are being a pain in the ass. For example, the toggle_resource method removes or adds a resource to a group, and when just after that I check the resources on that group, I still get the same ones before the toggle_resource method wa

[rspec-users] Stubbed static methods are bleeding over into other specs and making them fail

2011-02-22 Thread Peter Schrammel
rspec (1.3.1) rspec-rails (1.3.3) rails (2.3.3) Hi, there was another thread with this topic but with rspec 2.0 so I'll start a new one for the "old" branch. I have a workling class (working with method missing on "async_"). When I stub an async call: Catalog::PublisherWorker.should_receive(:

[rspec-users] Stubbing Sleep

2011-02-22 Thread James Martin
I've recently been playing around with some code that re-runs a block until either the block returns a non-false value, or a timeout expires: https://gist.github.com/838520 At first, I thought this was working, as I was just checking the timing of the examples when returning a true value, however