Rspec upgrade from 1.2.6 to 2.0.2 and/or 2.1.0

I am trying to upgrade a Rails 1.2.6 application to either 2.0.2 or
(preferably) 2.1.0 whichever works. The application has a hugh number
of rspec tests written. I am having problems getting past the first
Details: The application has both rspec (1.1.3) and rspec_on_rails
plugins installed in vendor/plugins directory. The application also had
Rails 1.2.6 frozen in the vendor directory. When I ran the following
code snippet in the account_spec.rb file, it ran fine (with Rails 1.2.6
frozen in vendor directory).

require File.dirname(FILE) + ‘/…/spec_helper’

describe Account do
it “should have valid fixture defaults” do
create_account.should be_valid

“create_account” exists in the spec_helper.rb.

Now to upgrade, first in Rails 2.0.2. I removed the Rails directory
from vendor directory, changed rails version in environment.rb from
1.2.6 to 2.0.2 and tried to rerun the same file/test as above. The code
does not even get past the first line of code, i.e., require
File.dirname …

I get the following exception trace:

load_missing_constant': Expected /home/bruparel/work/isabont/app/models/employer.rb to define Employer (LoadError) from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:453:inconst_missing’
const_missing' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:471:insend’

I am no rspec power user at this point, but have run rspec tests at
commmand line and in NetBeans IDE for Rails 1.2.x without any problems.
Thanks for your time.


const_get' from /home/bruparel/work/isabont/vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:88:inadd_to_class_singleton’
assign_init_variables' from /home/bruparel/work/isabont/vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:38:ininitialize’
… 15 levels…
load_files' from /home/bruparel/work/isabont/vendor/plugins/rspec/lib/spec/runner/options.rb:85:inrun_examples’
from /home/bruparel/work/isabont/vendor/plugins/rspec/bin/spec:4

The immediate problem has been solved with the help of someone who is
familiar with it.
The app used acts_as_list and acts_as_tree which was getting lost in the
stack trace. Since Rails 2.x has removed that from core, I had to
install them as plug-ins. It is working on Rails 2.0.2, next I will
attempt 2.1

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs