Hello,
I’m getting an error when running functional tests as follows, using
Mac OSX 10.4.9, Rails 1.2.3 .
When I run:
ruby test/functional/campaign_controller_test.rb
I get this error:
Started
E
Finished in 0.027402 seconds.
- Error:
test_should_get_icon_data(CampaignControllerTest):
Errno::ENOENT: No such file or directory - /usr/src/projects/myproject/
config/…/test/fixtures/campaings
/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
fixtures.rb:344:inopen' /sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:344:in
entries’
/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
fixtures.rb:344:inread_fixture_files' /sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:281:in
initialize’
/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
fixtures.rb:251:innew' /sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:251:in
create_fixtures’
/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
fixtures.rb:250:inmap' /sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:250:in
create_fixtures’
/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
base.rb:867:insilence' /sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:248:in
create_fixtures’
/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
fixtures.rb:593:inload_fixtures' /sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:538:in
setup_with_fixtures’
/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/
fixtures.rb:575:in `setup’
1 tests, 0 assertions, 0 failures, 1 errors
The file at /usr/src/projects/myproject/config/…/test/fixtures/
campaings is a valid yml file (campaings.yml) that loads fine in unit
tests. My functional test looks like:
require File.dirname(FILE) + ‘/…/test_helper’
require ‘campaign_controller’
Re-raise errors caught by the controller.
class CampaignController; def rescue_action(e) raise e end; end
class CampaignControllerTest < Test::Unit::TestCase
fixtures :campaings
def setup
@controller = CampaignController.new
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new
end
end
So I havent modified it at all and still I get this error. I have
tried adding some basic tests, but I still get the same error.
Any help figuring this out will be much appreciated!
Cheers,
nick