Re: [rspec-users] [ANN] rspec-rails 1.2.7 Released

2009-06-22 Thread David Chelimsky
I just pushed 1.2.7.1 to fix a bug in "script/generate rspec". Please use this instead of the 1.2.7 gem. Cheers, David On Mon, Jun 22, 2009 at 9:21 PM, David Chelimsky wrote: > rspec-rails-1.2.7 has been released! > > Behaviour Driven Development for Ruby on Rails. > > Changes: > > ### Version 1.

[rspec-users] [ANN] rspec-rails 1.2.7 Released

2009-06-22 Thread David Chelimsky
rspec-rails-1.2.7 has been released! Behaviour Driven Development for Ruby on Rails. Changes: ### Version 1.2.7 / 2009-06-22 * enhancements * alias :stub!, :stub so rspec-rails extensions of rspec stubs can use the same syntax as rspec (core) * integration specs (Ben Mabey and David Che

[rspec-users] [ANN] rspec 1.2.7 Released

2009-06-22 Thread David Chelimsky
rspec-1.2.7 has been released! * * * * * Behaviour Driven Development for Ruby. Changes: ### Version 1.2.7 / 2009-06-22 * enhancments * added support for fakes using obj.stub(:method) { # i

Re: [rspec-users] Spec'ing the result of rescue_from

2009-06-22 Thread David Chelimsky
On Mon, Jun 22, 2009 at 5:19 PM, PJ Kelly wrote: > Hey All, > > In my app, I have actions that are restricted to only POST requests in > config/routes.rb.  We were getting a fair number of MethodNotAllowed > errors on these actions.  In most cases, we're ok with sending the > user back to the homep

[rspec-users] Spec'ing the result of rescue_from

2009-06-22 Thread PJ Kelly
Hey All, In my app, I have actions that are restricted to only POST requests in config/routes.rb. We were getting a fair number of MethodNotAllowed errors on these actions. In most cases, we're ok with sending the user back to the homepage, however there are a few exceptions where we'd like to s

[rspec-users] Expected output matches rendered output but still getting error in view spec

2009-06-22 Thread Anthony Burns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello all, I've just gotten started using BDD with RSpec/Cucumber/Webrat and Rails and I've run into some frustration trying to get my view spec to pass. First of all, I am running Ruby 1.9.1p129 with Rails 2.3.2, RSpec and RSpec-Rails 1.2.6, Cucumbe

Re: [rspec-users] Where to put macros

2009-06-22 Thread Stefan Kanev
On Mon, Jun 22, 2009 at 7:37 PM, David Chelimsky wrote: > On Mon, Jun 22, 2009 at 11:28 AM, Andrew Premdas > wrote:What would folks think if that was included in the generated > spec_helper in spec-rails? > I, while not a regular patron in this mailing list, +1 this too. It would be very nice if

Re: [rspec-users] Testing a FormBuilder

2009-06-22 Thread Peer Allan
Yep, that solved it. Thanks! On Mon, Jun 22, 2009 at 3:02 PM, David Chelimsky wrote: > On Mon, Jun 22, 2009 at 2:57 PM, Peer Allan > wrote: > > Thanks David, I completely missed that in your first response. > > No problem. Let me know if it helps :) > > > Peer > > > > On Mon, Jun 22, 2009 at 2:3

Re: [rspec-users] Testing a FormBuilder

2009-06-22 Thread David Chelimsky
On Mon, Jun 22, 2009 at 2:57 PM, Peer Allan wrote: > Thanks David, I completely missed that in your first response. No problem. Let me know if it helps :) > Peer > > On Mon, Jun 22, 2009 at 2:31 PM, David Chelimsky > wrote: >> >> On Mon, Jun 22, 2009 at 2:07 PM, Peer Allan >> wrote: >> > Still h

Re: [rspec-users] Testing a FormBuilder

2009-06-22 Thread Peer Allan
Thanks David, I completely missed that in your first response. Peer On Mon, Jun 22, 2009 at 2:31 PM, David Chelimsky wrote: > On Mon, Jun 22, 2009 at 2:07 PM, Peer Allan > wrote: > > Still having trouble, here is my code. > > Code: > > class MyFormBuilder < ActionView::Helpers::FormBuilder > >

Re: [rspec-users] Testing a FormBuilder

2009-06-22 Thread David Chelimsky
On Mon, Jun 22, 2009 at 2:07 PM, Peer Allan wrote: > Still having trouble, here is my code. > Code: > class MyFormBuilder < ActionView::Helpers::FormBuilder >   def custom_select(field_name, *args) >     field_name ||= :salutation >     salutations = > Lookup.for_type_and_column('Contact','salutati

Re: [rspec-users] Testing a FormBuilder

2009-06-22 Thread Peer Allan
Still having trouble, here is my code. Code: class MyFormBuilder < ActionView::Helpers::FormBuilder def custom_select(field_name, *args) field_name ||= :salutation salutations = Lookup.for_type_and_column('Contact','salutation').map{|lookup| lookup.description} select(field_name, sa

Re: [rspec-users] Testing a FormBuilder

2009-06-22 Thread David Chelimsky
On Mon, Jun 22, 2009 at 12:53 PM, Peer Allan wrote: > Hello all, > In a bit of a conundrum here.  I have a custom form builder I am trying to > test and can't seem to get it to work.  I found this > http://www.pathf.com/blogs/2007/12/rspec-and-rails/ Things have changed a bit since Dec 07. The hel

Re: [rspec-users] Where to put macros

2009-06-22 Thread Stephen Eley
On Mon, Jun 22, 2009 at 12:37 PM, David Chelimsky wrote: > > The convention that I see emerging is to keep macros, helpers, and any > other spec supporting material in spec/support/macros, > spec/support/matchers, etc. +1 from me too. I've been calling my directory spec/helpers, but I've been wor

[rspec-users] Testing a FormBuilder

2009-06-22 Thread Peer Allan
Hello all, In a bit of a conundrum here. I have a custom form builder I am trying to test and can't seem to get it to work. I found this http://www.pathf.com/blogs/2007/12/rspec-and-rails/ which helps in that it points me to the HelperExampleGroup to get the @template methods I am going to need.

Re: [rspec-users] Where to put macros

2009-06-22 Thread Ben Mabey
On Jun 22, 2009, at 10:37 AM, David Chelimsky wrote: On Mon, Jun 22, 2009 at 11:28 AM, Andrew Premdas wrote: Recently I got some wonderful help from the list to create my NamedAddress module/macro which tests NamedAddresses for a number of different resources. The question I have is where

Re: [rspec-users] Where to put macros

2009-06-22 Thread Ben Mabey
On Jun 22, 2009, at 10:28 AM, Andrew Premdas wrote: Recently I got some wonderful help from the list to create my NamedAddress module/macro which tests NamedAddresses for a number of different resources. The question I have is where should I put this module? At the moment I've got it in s

Re: [rspec-users] Where to put macros

2009-06-22 Thread David Chelimsky
On Mon, Jun 22, 2009 at 11:28 AM, Andrew Premdas wrote: > Recently I got some wonderful help from the list to create my NamedAddress > module/macro which tests NamedAddresses for a number of different resources. > The question I have is where should I put this module? At the moment I've > got it in

[rspec-users] Where to put macros

2009-06-22 Thread Andrew Premdas
Recently I got some wonderful help from the list to create my NamedAddress module/macro which tests NamedAddresses for a number of different resources. The question I have is where should I put this module? At the moment I've got it in spec_helper, but this feels a bit messy Many thanks Andrew __

Re: [rspec-users] [Cucumber] Autospec run "only" features ?

2009-06-22 Thread David Chelimsky
On Mon, Jun 22, 2009 at 10:50 AM, Peter Fitzgibbons wrote: > Hello All, > Is there a way to Autospec "only" my features? Autospec is RSpec's thin wrapper that specifically enables running specs. If you don't want to run your specs, use the autotest command instead. > I know this is an anti-patter

[rspec-users] [Cucumber] Autospec run "only" features ?

2009-06-22 Thread Peter Fitzgibbons
Hello All, Is there a way to Autospec "only" my features? I know this is an anti-pattern. Just trying to auto-cycle while figuring out some things with Cucumber. Once I get the Cuke code ironed out, I'd happily return to correct Rspec-Then-Cuke auto-cycling. Thoughts? Peter Fitzgibbons (847) 687

Re: [rspec-users] [Cucumber] Successive requests with xml Content-Type fail?

2009-06-22 Thread David Chelimsky
On Mon, Jun 22, 2009 at 1:53 AM, Wolfram Arnold wrote: > I'm writing a cucumber test for an xml webservice.  When making POST's > the Content-Type in the header is set to "application/xml" and for any > request, the Accept header is set to "application/xml" (aka > Mime::XML.to_s) > > I'm running in