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

2009-11-08 Thread Rodrigo Rosenfeld Rosas
Carlos Rodriguez escreveu: 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) I have thought on t

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 ___

Re: [rspec-users] Error executing specs using Ruby 1.9.1p243 and RSpec 1.2.9

2009-11-08 Thread David Chelimsky
On Sun, Nov 8, 2009 at 2:35 AM, Conrad Taylor wrote: > David, I'm still seeing the issue. Thus, here's a transcript of my > activity: > > http://pastie.org/688639 $ gem which fakefs (checking gem bmabey-fakefs-0.1.1.1 for fakefs) /Users/david/.rvm/gems/ruby/1.9.1/gems/bmabey-fakefs-0.1.1.1/lib

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

2009-11-08 Thread Ashley Moran
On Nov 08, 2009, at 10:39 am, Rodrigo Rosenfeld Rosas wrote: @post.published_at.should be_nil @post.publish! (Time.now - @post.published_at).should have_at_most(1).second FWIW, this is what I do too, although I normally use "should <" or "be_close", but the idea is the same. You only need

Re: [rspec-users] Error executing specs using Ruby 1.9.1p243 and RSpec 1.2.9

2009-11-08 Thread Conrad Taylor
David, I'm still seeing the issue. Thus, here's a transcript of my activity: http://pastie.org/688639 -Conrad On Nov 4, 2:28 pm, David Chelimsky wrote: > On Tue, Nov 3, 2009 at 7:25 AM, Conrad Taylor wrote: > > Hi, 'rake spec' failed to run on Ruby 1.9.1p243 and RSpec 1.2.9. > > Hi Conrad, >

Re: [rspec-users] [rspec-devel] describe "RSpec's documentation" do

2009-11-08 Thread David Chelimsky
On Sun, Nov 8, 2009 at 5:55 AM, Rodrigo Rosenfeld Rosas < lboc...@yahoo.com.br> wrote: > David Chelimsky escreveu: > >> >> As for internals, my goal for the Cucumber features is to provide an >> executable set of documentation for end users to understand how to use >> RSpec. Not so much to expose

Re: [rspec-users] [rspec-devel] describe "RSpec's documentation" do

2009-11-08 Thread David Chelimsky
On Sat, Nov 7, 2009 at 11:39 PM, Stephen Eley wrote: > On Sat, Nov 7, 2009 at 9:31 PM, David Chelimsky > wrote: > > > > As for internals, my goal for the Cucumber features is to provide an > > executable set of documentation for end users to understand how to use > > RSpec. Not so much to expose

Re: [rspec-users] [rspec-devel] describe "RSpec's documentation" do

2009-11-08 Thread Rodrigo Rosenfeld Rosas
David Chelimsky escreveu: ... As for internals, my goal for the Cucumber features is to provide an executable set of documentation for end users to understand how to use RSpec. Not so much to expose internals, which I think is better addressed in the RSpec code examples themselves. Make sense

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

2009-11-08 Thread Rodrigo Rosenfeld Rosas
David Chelimsky escreveu: On Sat, Nov 7, 2009 at 6:18 PM, Carlos Rodriguez > wrote: 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 t