[rspec-users] I can't make RSpec 1.0.8 run in Rails 1.2.3

David Chelimsky dchelimsky at gmail.com
Fri Oct 5 17:24:56 EDT 2007


On 10/5/07, Daniel Mantilla <dmantilla at yahoo.com> wrote:
>
> I followed the directions on the site:
>
> ruby script/plugin install
> svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec
> ruby script/plugin install
> svn://rubyforge.org/var/svn/rspec/tags/REL_1_0_8/rspec_on_rails
> ruby script/generate rspec

First - the directions on the site should guide you to use either
CURRENT for both or REL_1_0_8 for both.

>
> And apparently everything was ok. But when I do a "rake spec" on the app
> folder none of the Rails models are visible. Here is the error:

What do you mean "rake spec on the app folder"? You should be in the
project root. Are you?

>
> (in C:/Projects/Rails/Workspace/MPS)
> ./spec/report_class_spec.rb:4: uninitialized constant ReportClass
> (NameError)

Well - not sure why your'e geting a name error, but a model spec
should be in spec/models:

spec/models/report_class_spec.rb

HTH,
David

>
> I just have this on report_class_spec.rb:
>
> describe ReportClass, '#new' do
> end
>
> ReportClass was already created on app/models. When I add the following line
> at the top of the file it complains about ActiveRecord (uninitialized
> constant)
>
> require File.dirname(__FILE__) + '/../app/models/report_class'
>
> Thanks in advance,
>
> Daniel
>
>  ________________________________
>  All new Yahoo! Mail - ________________________________
> Get a sneak peak at messages with a handy reading pane.
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list