Re: [rspec-users] [Rails] How to mock/stub link_to from a Rails helper spec?

2009-08-21 Thread Ed Ruder
On Aug 20, 3:02 pm, Mike Sassak wrote: > On Thu, Aug 20, 2009 at 3:00 PM, Ed Ruder wrote: > > All, > > > In a Rails helper spec, how do I stub or mock the 'link_to' method? > > When i step into link_to, self.class is > > > Spec::Rails::Example::HelperExampleGroup::Subclass_1::Subclass_5::Subclass

Re: [rspec-users] Sharing code and still keeping a "only commit if all is green" discipline

2009-08-21 Thread Stephen Eley
On Fri, Aug 21, 2009 at 4:44 PM, Rick DeNatale wrote: > > Actually, the way I read it was that management was already on board > with git and approved converting over to it which they have, but it's > the cow orkers and their lack of training which is "preventing" them > from actually benefitting f

Re: [rspec-users] Sharing code and still keeping a "only commit if all is green" discipline

2009-08-21 Thread Rick DeNatale
On Fri, Aug 21, 2009 at 1:17 PM, Stephen Eley wrote: > Question for you: is "management" committing code? > > If not, why should you need to convince them of anything?  Don't ask > permission.  Branching doesn't need any extra budget.  Just start > doing it.  Follow good practices, and let your tea

[rspec-users] running rake spec:remote

2009-08-21 Thread oren
When running autotest only 'rake spec' is running and I want it to run 'rake spec:remote' as well. How do i achieve that? thanks ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Problem Comparing Dates

2009-08-21 Thread George Anderson
Spot on, Tom. Thanks. For the (google) record: Time.usec Returns just the number of microseconds for the given time. ActiveRecord datetime attributes ignore microseconds (at least with the SQLite adapter). In my case: now.usec: 991786 @verif

Re: [rspec-users] Sharing code and still keeping a "only commit if all is green" discipline

2009-08-21 Thread Stephen Eley
On Fri, Aug 21, 2009 at 11:14 AM, Marcelo de Moraes Serpa wrote: > > I'm using git, actually I love git. However, we started with svn > unfortunately and only now the management saw the benefits of git and > we migrated. However, 99% of the developers of this project does not > know how to use git,

Re: [rspec-users] Sharing code and still keeping a "only commit if all is green" discipline

2009-08-21 Thread Rick DeNatale
On Fri, Aug 21, 2009 at 11:14 AM, Marcelo de Moraes Serpa wrote: > we started with svn > unfortunately and only now the management saw the benefits of git and > we migrated. However, 99% of the developers of this project does not > know how to use git, and with this I mean they don't know what > br

Re: [rspec-users] Problem Comparing Dates

2009-08-21 Thread Tom Stuart
On 21 Aug 2009, at 17:15, George Anderson wrote: expected: Fri, 21 Aug 2009 16:08:51 UTC +00:00, got: Fri, 21 Aug 2009 16:08:51 UTC +00:00 (using ==) They're identical, no? Not necessarily -- Time instances are microsecond precision, so two of them can differ (in microseconds) but hav

[rspec-users] Problem Comparing Dates

2009-08-21 Thread George Anderson
I'm having an issue comparing two seemingly equivalent dates: spec: it "sets the user's session_key_updated_at" do now = Time.zone.now Timecop.freeze(now) do verify_user @verified_user.session_key_updated_at.should == now end end output: sets the user's session_key_updated_at expect

Re: [rspec-users] Sharing code and still keeping a "only commit if all is green" discipline

2009-08-21 Thread Marcelo de Moraes Serpa
Thanks guys, Well, I think that one of the approaches would be to setup the integration server to run only "the features that should pass", and ignore the other ones (using tagging). @Stephen: Sorry, I used the wrong term. I did not mean partial commit in the technical term, but a "partial featur