Re: [rspec-users] how can this pass?

2009-02-09 Thread Sergio Bayona
Mark Wilden wrote: > On Sun, Feb 8, 2009 at 6:54 PM, Sergio Bayona > wrote: > >> > On Mon, Feb 9, 2009 at 2:35 AM, Sergio Bayona >> > wrote: >> >> >> >>assigns[:property].should equal(mock_property) >> >> 1 example, 0 failures >> >> >> >> >> >> why zero failures? more specifically, why

Re: [rspec-users] RSpec Testing ActiveRecord config dependency.

2009-02-09 Thread James Byrne
James Byrne wrote: > It seems that I am not overriding the AR:BASE.default_timezone setting > since, as far as I can tell, the values stored are the same whatever > value I set the default_tz to. > Well, after a very frustrating afternoon I have finally uncovered what is going on. The proble

Re: [rspec-users] RSpec Testing ActiveRecord config dependency.

2009-02-09 Thread James Byrne
David Chelimsky wrote: > Now this violates a principle that you shouldn't stub things on the > object you're spec'ing, but the alternative is to play with global > values, which violates other principles. This is the simplest way IMO. > But if you're concerned about internals of AR changing, you c

Re: [rspec-users] RSpec Testing ActiveRecord config dependency.

2009-02-09 Thread David Chelimsky
On Mon, Feb 9, 2009 at 9:12 AM, James Byrne wrote: > I have the following library code: > >def normal_time_now > return DateTime.now.utc if default_timezone == :utc > return DateTime.now >end > > This is dependent upon a setting in config/environment.rb > > # Make Active Record

Re: [rspec-users] RecordNotFound bubbling thru to cucumber

2009-02-09 Thread Ben Mabey
aslak hellesoy wrote: On Mon, Feb 9, 2009 at 3:58 PM, Stephen Eley wrote: On Mon, Feb 9, 2009 at 6:11 AM, aslak hellesoy wrote: It's because Cucumber's Rails support configures ActionController to send all errors straight through. See cucumber/rails/world.rb Patches and suggestions a

Re: [rspec-users] RecordNotFound bubbling thru to cucumber

2009-02-09 Thread Zach Dennis
On Mon, Feb 9, 2009 at 10:21 AM, aslak hellesoy wrote: > On Mon, Feb 9, 2009 at 3:58 PM, Stephen Eley wrote: >> On Mon, Feb 9, 2009 at 6:11 AM, aslak hellesoy >> wrote: >>> >>> It's because Cucumber's Rails support configures ActionController to >>> send all errors straight through. >>> See cuc

[rspec-users] RSpec Testing ActiveRecord config dependency.

2009-02-09 Thread James Byrne
I have the following library code: def normal_time_now return DateTime.now.utc if default_timezone == :utc return DateTime.now end This is dependent upon a setting in config/environment.rb # Make Active Record use UTC-base instead of local time config.active_record.defaul

Re: [rspec-users] RecordNotFound bubbling thru to cucumber

2009-02-09 Thread aslak hellesoy
On Mon, Feb 9, 2009 at 3:58 PM, Stephen Eley wrote: > On Mon, Feb 9, 2009 at 6:11 AM, aslak hellesoy > wrote: >> >> It's because Cucumber's Rails support configures ActionController to >> send all errors straight through. >> See cucumber/rails/world.rb >> >> Patches and suggestions about how to

Re: [rspec-users] RecordNotFound bubbling thru to cucumber

2009-02-09 Thread Stephen Eley
On Mon, Feb 9, 2009 at 6:11 AM, aslak hellesoy wrote: > > It's because Cucumber's Rails support configures ActionController to > send all errors straight through. > See cucumber/rails/world.rb > > Patches and suggestions about how to improve this are welcome. > (In most cases it's easier to spot e

Re: [rspec-users] step definitons to check login

2009-02-09 Thread Nick Hoffman
On 17/12/2008, at 9:56 AM, James Byrne wrote: Re: authlogin Can someone familiar with this gem explain where and how the user_sessions are maintained? I have pawed through the code but it has left me rather more confused than not. The best inkling I can arrive at is that the authlogic pe

Re: [rspec-users] how can this pass?

2009-02-09 Thread David Chelimsky
On Mon, Feb 9, 2009 at 6:22 AM, Matías Flores wrote: > > 2009/2/9 Mark Wilden >> >> On Sun, Feb 8, 2009 at 6:09 PM, Matías Flores >> wrote: >> > >> > You can find more info at >> > http://rspec.info/documentation/mocks/message_expectations.html. >> > >> >> On that page, I found this example of u

Re: [rspec-users] [RSpec] Setting a gem dep on rspec-rails

2009-02-09 Thread Nick Hoffman
On 08/02/2009, at 4:39 PM, Matt Wynne wrote: On 7 Feb 2009, at 19:02, David Chelimsky wrote: On Sat, Feb 7, 2009 at 12:27 PM, Pat Maddox wrote: On Sat, Feb 7, 2009 at 9:30 AM, Nick Hoffman wrote: With that said, I'm wondering what the accepted way to setup gem dependencies on rspec and rs

Re: [rspec-users] how can this pass?

2009-02-09 Thread Matías Flores
2009/2/9 Mark Wilden > On Sun, Feb 8, 2009 at 6:09 PM, Matías Flores > wrote: > > > > You can find more info at > http://rspec.info/documentation/mocks/message_expectations.html. > > > > On that page, I found this example of using a computed return value > with an expectation: > > my_mock.should

Re: [rspec-users] RecordNotFound bubbling thru to cucumber

2009-02-09 Thread aslak hellesoy
On Fri, Feb 6, 2009 at 6:12 PM, Jeff Talbot wrote: > Hello, > > I have a controller action that raises a RecordNotFound exception if > you're not allowed to see something. In my global application > controller (application.rb), I catch these and render the 404 > template. But when I run cucumber (