Re: [rspec-users] "lambda Should Change" Behavior Failing When Checking Time

2009-11-08 Thread Carlos Rodriguez
Thanks to everyone that responded to my question. Here is what I ended up doing to make the spec pass: time_now = Time.now Time.stub!(:now).and_return(time_now) lambda { @post.publish! }.should change(@post, :published_at).from(nil).to(time_now) Carlos ___

[rspec-users] "lambda Should Change" Behavior Failing When Checking Time

2009-11-07 Thread Carlos Rodriguez
Hello, I'm having a problem with RSpec when using the "lambda should change behavior". This is happening in a Rails 2.3.4 app and I'm running the following in my test environment: 'cucumber', :version => '0.4.2' 'faker', :version => '0.3.1' 'notahat-machinist', :lib => 'machinist', :version => '