[rspec-users] does the rspec_scaffold generator know about :references ?
lists at ruby-forum.com
Wed Feb 20 00:35:19 EST 2008
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.
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
ews/my_bars/index.html.erb_spec.rb:17: syntax error, unexpected ','
response.should have_tag("tr>td", , 2)
Posted via http://www.ruby-forum.com/.
More information about the rspec-users