Re: [rspec-users] RSpec 2, Rails 3, and SSL routes

2010-12-13 Thread Brian Ploetz
Anybody? On Dec 9, 3:22 pm, Brian Ploetz wrote: > Hi all, > > This is probably a stupid question, but I can't figure out how to do > this. > > If I have some routes which require SSL, how do I test that with > RSpec? For example: > > # routes.rb > scope :constraints => { :protocol => "https"

Re: [rspec-users] RSpec 2, Rails 3, and SSL routes

2010-12-13 Thread David Chelimsky
On Dec 13, 2010, at 7:55 AM, Brian Ploetz wrote: > Anybody? > > On Dec 9, 3:22 pm, Brian Ploetz wrote: >> Hi all, >> >> This is probably a stupid question, but I can't figure out how to do >> this. >> >> If I have some routes which require SSL, how do I test that with >> RSpec? For example

Re: [rspec-users] RSpec 2, Rails 3, and SSL routes

2010-12-13 Thread Brian Ploetz
OK, cool. I'll avoid banging my head against the wall in the mean time. :-) Thanks alot David. BP On Dec 13, 9:16 am, David Chelimsky wrote: > On Dec 13, 2010, at 7:55 AM, Brian Ploetz wrote: > > > > > Anybody? > > > On Dec 9, 3:22 pm, Brian Ploetz wrote: > >> Hi all, > > >> This is probably a

Re: [rspec-users] RSpec 2, Rails 3, and SSL routes

2010-12-13 Thread Brian Ploetz
Actually, Rails seems to correctly support *some* routing constraints in tests (:format being one), but not others (:protocol being one). I'm coming up with a failing test which I'll attach to that Rails ticket, but just noting it here as an FYI to others... On Dec 13, 9:43 am, Brian Ploetz wrot

[rspec-users] Count error on lambda should change

2010-12-13 Thread djangst
Hi, any idea what could cause the following error in a controller test? "count should have been changed by 1, but was changed by 0" I'm posting to a create route using a lambda, similar to Hartl's example in his Rails tutorial: it "should create a user" do lambda do post :create, :use

[rspec-users] Count error on lambda should change

2010-12-13 Thread djangst
Hi, any idea what could cause the following error in a controller test? "count should have been changed by 1, but was changed by 0" I'm posting to a create route using a lambda, similar to Hartl's example in his Rails tutorial: it "should create a user" do lambda do post :create, :user =

Re: [rspec-users] Count error on lambda should change

2010-12-13 Thread David Chelimsky
On Mon, Dec 13, 2010 at 4:31 PM, djangst wrote: > Hi, any idea what could cause the following error in a controller > test? > >     "count should have been changed by 1, but was changed by 0" > > I'm posting to a create route using a lambda, similar to Hartl's > example in his Rails tutorial: > >

[rspec-users] nested examples in html formatter

2010-12-13 Thread Jonathan Linowes
Is there a way for the html formatter to show nested "describe" blocks, as written in my examples. Or perhaps I should change how I write my examples so nesting can be shown? eg describe MyModel do it "should be valid" describe "something" do it "should do this c