Spec is not a class (TypeError)
/Volumes/Data/Beo/Documents/RailsSpace/app/models/spec.rb:1
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`polyglot_original_require'
/opt/local/lib/ruby/gems/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in
`require'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_support/dependencies.rb:158:in `require'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_support/dependencies.rb:265:in `require_or_load'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_support/dependencies.rb:224:in `depend_on'
/opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/
active_support/dependencies.rb:136:in `require_dependency'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:
414:in `load_application_classes'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:
413:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:
413:in `load_application_classes'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:
411:in `each'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:
411:in `load_application_classes'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:
197:in `process'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:
113:in `send'
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:
113:in `run'
/Volumes/Data/Beo/Documents/OptiDev/config/environment.rb:9
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`polyglot_original_require'
/opt/local/lib/ruby/gems/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in
`require'
/Volumes/Data/Beo/Documents/OptiDev/features/support/env.rb:8
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`polyglot_original_require'
/opt/local/lib/ruby/gems/1.8/gems/polyglot-0.2.9/lib/polyglot.rb:70:in
`require'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.6.1/bin/../lib/cucumber/
rb_support/rb_language.rb:124:in `load_code_file'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.6.1/bin/../lib/cucumber/
step_mother.rb:84:in `load_code_file'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.6.1/bin/../lib/cucumber/
step_mother.rb:76:in `load_code_files'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.6.1/bin/../lib/cucumber/
step_mother.rb:75:in `each'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.6.1/bin/../lib/cucumber/
step_mother.rb:75:in `load_code_files'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.6.1/bin/../lib/cucumber/
cli/main.rb:48:in `execute!'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.6.1/bin/../lib/cucumber/
cli/main.rb:20:in `execute'
/opt/local/lib/ruby/gems/1.8/gems/cucumber-0.6.1/bin/cucumber:8
/opt/local/bin/cucumber:19:in `load'
/opt/local/bin/cucumber:19
On Jan 26, 6:51 pm, Vincent P <ease...@gmail.com> wrote:
> I am trying to use cucumber but my application has a "Spec" model (I
> followed the RailsSpace book).
...which is quite out of date.
> So now I am getting an error when
> running cucumber (below). I think because cucumber does not like a
> model named "Spec."
Actually, I think that would be more of a proble for RSpec. But I
could be wrong.
> But I have "Spec" and "spec(s)" everywhere in my
> application now. A universal text change is a huge pain. Some
> innocent text contains the string "spec", e.g. "aspect". So I have to
> look at each replacement.
Well, you should look at each replacement anyway.
> What can I do? Please help.
Try a regular expression search and replace, so that you don't hit
innocent words.
> Thanks.
>
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
I started with RailsSpace as a starting point a while back but my
application has evolved since.
Most likely.
> There is no other
> way but to change "Spec" to something else?
Probably not. And this should not be difficult.
>
> I started with RailsSpace as a starting point a while back but my
> application has evolved since.
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
mar...@marnen.org
--
Posted via http://www.ruby-forum.com/.
Thanks.
Most regexp syntaxes support backreferences in the replace string, which
is what you need. Check TextMate's documentation to see how it
implements backreferences.
> Thanks.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thank you so much for motivating me to use Cucumber. It makes
functional and integration testing so easy!
Vincent.
> > Posted viahttp://www.ruby-forum.com/.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Ruby on Rails: Talk" group.
> > To post to this group, send email to rubyonra...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > rubyonrails-ta...@googlegroups.com<rubyonrails-talk%2Bunsubscrib e...@googlegroups.com>
You're most welcome. It's amazing, isn't it?
>
> Vincent.