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
base.
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
end
end
"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:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:249:in
`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:in
`const_missing''
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:465:in
`const_missing''
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:471:in
`send''
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:471:in
`const_missing''
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.
Bharat
from
/home/bruparel/work/isabont/vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:88:in
`const_get''
from
/home/bruparel/work/isabont/vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:88:in
`add_to_class_singleton''
from
/home/bruparel/work/isabont/vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:99:in
`assign_init_variables''
from
/home/bruparel/work/isabont/vendor/plugins/fixture_replacement/lib/fixture_replacement/fixture_replacement_generator.rb:38:in
`initialize''
... 15 levels...
from
/home/bruparel/work/isabont/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:13:in
`load_files''
from
/home/bruparel/work/isabont/vendor/plugins/rspec/lib/spec/runner/options.rb:85:in
`run_examples''
from
/home/bruparel/work/isabont/vendor/plugins/rspec/lib/spec/runner/command_line.rb:19:in
`run''
from /home/bruparel/work/isabont/vendor/plugins/rspec/bin/spec:4
--
Posted via http://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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---