[rspec-users] does the rspec_scaffold generator know about :references ?
dchelimsky at gmail.com
Wed Feb 20 07:28:23 EST 2008
On Feb 20, 2008 12:35 AM, Peter Recore <lists at ruby-forum.com> wrote:
> I checked out the CURRENT release of rspec and rails_spec as outlined on
> the rubyforge page. I am having trouble with models that use the
> :references column type. I get tests with syntax errors after
> generating a new class from scratch using ruby script/generate
> rspec_scaffold. The problem seems to be that no default values are
> generated for these types in the templates used by the generator. I
> feel that there is a 2/3 chance I am wrong here, and 1/3 that rspec just
> doesn't handle this part of rails 2 yet.
> 1. I am supposed to edit the spec scaffolding for all models with
> 2. I am doing something else wrong.
> 3. Rspec just doesn't support :references yet, and I should maybe
> figure out how and write a patch, assuming I continue to use rspec and
> fall in love with it like everyone seems to have.
#3 - patch away: http://rspec.lighthouseapp.com.
> Can anyone tell me which of the above is correct, if any?
> Thanks! (PS: spec_server is going to save my sanity on my ever so cute
> but ever so slow ultraportable)
> Here is the line i use to generate the class:
> ruby script/generate rspec_scaffold MyBar foo:references
> Here is the specific syntax error. You can see where the value should be
> is blank.
> `load': C:/instantrails/rails_apps/silver/spec/vi
> ews/my_bars/index.html.erb_spec.rb:17: syntax error, unexpected ','
> response.should have_tag("tr>td", , 2)
> ^ from
> :in `load'
> from script/spec:4
> Posted via http://www.ruby-forum.com/.
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users