Re: [rspec-users] issue with rescue_action_in_public! and testing 404 responses

2010-08-09 Thread David Chelimsky
On Aug 8, 2010, at 2:53 PM, christofferklang wrote: > Hello, > I'm new to rails and I'm trying to wrap my heads around how to spec > controllers using RSpec (using rails 3rc1 and rspec 2.0.0.beta.19). > > The problem I've run into is when I want to test that my controllers respond > with a 404

[rspec-users] Bad gemspec for rspec-core

2010-08-09 Thread François Beausoleil
I receive this message when bundling using this example project: http://github.com/francois/rental_agency/tree/1ea252624e161ddc305a719d505a633d8d464e49 The included Gemfile references HEAD of rspec-core, and the gemspec there has this issue: Using rspec-core (2.0.0.beta.19) from git://github.com/

[rspec-users] issue with rescue_action_in_public! and testing 404 responses

2010-08-09 Thread christofferklang
Hello, I'm new to rails and I'm trying to wrap my heads around how to spec controllers using RSpec (using rails 3rc1 and rspec 2.0.0.beta.19). The problem I've run into is when I want to test that my controllers respond with a 404 for unfound records. Whenever I run the spec, the ActiveRecor

Re: [rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-09 Thread Rick DeNatale
On Mon, Aug 9, 2010 at 11:23 AM, David Chelimsky wrote: > > On Aug 9, 2010, at 9:56 AM, Rick DeNatale wrote: > >> On Sun, Aug 8, 2010 at 11:45 PM, Elliot Winkler >> wrote: >>> On Sun, Aug 8, 2010 at 3:53 PM, Phillip Koebbe >>> wrote: Here's another idea that's not so great, but maybe i

Re: [rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-09 Thread David Chelimsky
On Aug 9, 2010, at 9:56 AM, Rick DeNatale wrote: > On Sun, Aug 8, 2010 at 11:45 PM, Elliot Winkler > wrote: >> On Sun, Aug 8, 2010 at 3:53 PM, Phillip Koebbe >> wrote: >>> >>> Here's another idea that's not so great, but maybe it will spur some >>> thinking in someone else. What about a custom

Re: [rspec-users] Order guarantees of let

2010-08-09 Thread David Chelimsky
On Aug 9, 2010, at 10:06 AM, Rick DeNatale wrote: > On Mon, Aug 9, 2010 at 8:49 AM, David Chelimsky wrote: >> >> On Aug 9, 2010, at 7:38 AM, Ashley Moran wrote: >> >>> Hi >>> >>> I was just about to replace a `before` block along the lines of: >>> >>> before(:each) do >>>@cti_b_id = ser

Re: [rspec-users] Order guarantees of let

2010-08-09 Thread Rick DeNatale
On Mon, Aug 9, 2010 at 8:49 AM, David Chelimsky wrote: > > On Aug 9, 2010, at 7:38 AM, Ashley Moran wrote: > >> Hi >> >> I was just about to replace a `before` block along the lines of: >> >>  before(:each) do >>   �...@cti_b_id = service.create(name: "Item-B") >>   �...@cti_z_id = service.create(

Re: [rspec-users] Recognising RSpec files in the Textmate bundle

2010-08-09 Thread Rick DeNatale
On Sun, Aug 8, 2010 at 11:45 PM, Elliot Winkler wrote: > On Sun, Aug 8, 2010 at 3:53 PM, Phillip Koebbe > wrote: >> >> Here's another idea that's not so great, but maybe it will spur some >> thinking in someone else. What about a custom generator (or a flag on the >> official one) that added some

Re: [rspec-users] Name collision - how would you handle this?

2010-08-09 Thread David Chelimsky
On Aug 9, 2010, at 7:42 AM, Matt Wynne wrote: > > On 9 Aug 2010, at 13:04, David Chelimsky wrote: > >> >> On Aug 9, 2010, at 6:37 AM, Matt Wynne wrote: >> >>> >>> On 9 Aug 2010, at 01:54, David Chelimsky wrote: >>> On Aug 8, 2010, at 11:13 AM, Matt Wynne wrote: > >

Re: [rspec-users] Order guarantees of let

2010-08-09 Thread David Chelimsky
On Aug 9, 2010, at 7:38 AM, Ashley Moran wrote: > Hi > > I was just about to replace a `before` block along the lines of: > > before(:each) do >@cti_b_id = service.create(name: "Item-B") >@cti_z_id = service.create(name: "Z-Item") >@cti_a_id = service.create(name: "Item-A") >#

[rspec-users] Order guarantees of let

2010-08-09 Thread Ashley Moran
Hi I was just about to replace a `before` block along the lines of: before(:each) do @cti_b_id = service.create(name: "Item-B") @cti_z_id = service.create(name: "Z-Item") @cti_a_id = service.create(name: "Item-A") # ... end with let!(:cti_b_id) { ... } let!(:cti_z_id)

Re: [rspec-users] Name collision - how would you handle this?

2010-08-09 Thread Matt Wynne
On 9 Aug 2010, at 13:04, David Chelimsky wrote: > > On Aug 9, 2010, at 6:37 AM, Matt Wynne wrote: > >> >> On 9 Aug 2010, at 01:54, David Chelimsky wrote: >> >>> >>> On Aug 8, 2010, at 11:13 AM, Matt Wynne wrote: >>> On 8 Aug 2010, at 16:53, David Chelimsky wrote: > On A

Re: [rspec-users] Name collision - how would you handle this?

2010-08-09 Thread David Chelimsky
On Aug 9, 2010, at 6:37 AM, Matt Wynne wrote: > > On 9 Aug 2010, at 01:54, David Chelimsky wrote: > >> >> On Aug 8, 2010, at 11:13 AM, Matt Wynne wrote: >> >>> >>> On 8 Aug 2010, at 16:53, David Chelimsky wrote: >>> On Aug 8, 2010, at 10:40 AM, Matt Wynne wrote: > On 8 Aug 2010, at

Re: [rspec-users] Name collision - how would you handle this?

2010-08-09 Thread Matt Wynne
On 9 Aug 2010, at 01:54, David Chelimsky wrote: > > On Aug 8, 2010, at 11:13 AM, Matt Wynne wrote: > >> >> On 8 Aug 2010, at 16:53, David Chelimsky wrote: >> >>> On Aug 8, 2010, at 10:40 AM, Matt Wynne wrote: On 8 Aug 2010, at 16:38, David Chelimsky wrote: > On Aug 7, 2010, at 4:10 P

Re: [rspec-users] testing 404 redirects in the controller with rspec beta 19

2010-08-09 Thread Christoffer Klang
Ah, that looks quite interesting. I'd prefer to let rails do the 404 error handling (adding more magic to the already overwhelming amount is to much for my brain at this point ;), but if I'll have to handle it myself this looks like a viable solution. Thanks, /Christoffer On Aug 9, 2010, at 1

Re: [rspec-users] testing 404 redirects in the controller with rspec beta 19

2010-08-09 Thread Phillip Koebbe
On 2010-08-09 1:29 AM, christofferklang wrote: Hello, I'm new to rails and I'm trying to wrap my heads around how to spec controllers using RSpec (using rails 3rc1 and rspec 2.0.0.beta.19). The problem I've run into is when I want to test that my controllers respond with a 404 for unfound r