# Error when running functional test - Errno::ENOENT

**URL:** <https://discuss.rubyonrails.org/t/error-when-running-functional-test-errno-enoent/14446>\
**Category:** rubyonrails-talk\
**Created:** [June 15, 2007, 12:23pm UTC](https://discuss.rubyonrails.org/t/error-when-running-functional-test-errno-enoent/14446 "2007-06-15T12:23:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nickb](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@Nickb](https://discuss.rubyonrails.org/u/Nickb)\
**Post date:** [June 15, 2007, 12:23pm UTC](https://discuss.rubyonrails.org/t/error-when-running-functional-test-errno-enoent/14446/1 "2007-06-15T12:23:45Z")

</div>

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.

&nbsp;&nbsp;1) Error: test\_should\_get\_icon\_data(CampaignControllerTest): Errno::ENOENT: No such file or directory - /usr/src/projects/myproject/ config/../test/fixtures/campaings &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/ fixtures.rb:344:in `open' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:344:in `entries' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/ fixtures.rb:344:in `read_fixture_files' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:281:in `initialize' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/ fixtures.rb:251:in `new' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:251:in `create\_fixtures' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/ fixtures.rb:250:in `map' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:250:in `create\_fixtures' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/ base.rb:867:in `silence' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:248:in `create\_fixtures' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active\_record/ fixtures.rb:593:in `load_fixtures' &nbsp;&nbsp;&nbsp;&nbsp;/sw/lib/ruby/gems/1.8/gems/activerecord-1.15.3/lib/active_record/ fixtures.rb:538:in `setup\_with\_fixtures' &nbsp;&nbsp;&nbsp;&nbsp;/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 &nbsp;&nbsp;fixtures :campaings

&nbsp;&nbsp;def setup &nbsp;&nbsp;&nbsp;&nbsp;@controller = CampaignController.new &nbsp;&nbsp;&nbsp;&nbsp;@request = ActionController::TestRequest.new &nbsp;&nbsp;&nbsp;&nbsp;@response = ActionController::TestResponse.new &nbsp;&nbsp;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

---

<div class="post-metadata">

**Author:** ![Bill\_Walton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@Bill\_Walton](https://discuss.rubyonrails.org/u/Bill_Walton)\
**Post date:** [June 15, 2007, 12:34pm UTC](https://discuss.rubyonrails.org/t/error-when-running-functional-test-errno-enoent/14446/2 "2007-06-15T12:34:15Z")

</div>

Hi Nick,

Nickb wrote:

> 1) Error: test\_should\_get\_icon\_data(CampaignControllerTest): Errno::ENOENT: No such file or directory - /usr/src/projects/myproject/ config/../test/fixtures/campaings

Assuming you copy/pasted the error, I'd suggest the problem may be exposed in the order of the last three letters of the last line above.

hth, Bill

---

<div class="post-metadata">

**Author:** ![Nickb](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@Nickb](https://discuss.rubyonrails.org/u/Nickb)\
**Post date:** [June 15, 2007, 12:43pm UTC](https://discuss.rubyonrails.org/t/error-when-running-functional-test-errno-enoent/14446/3 "2007-06-15T12:43:24Z")

</div>

Its always the simple things! Thanks for the help.

---

<div class="post-metadata">

**Author:** ![Bill\_Walton](https://avatars.discourse-cdn.com/v4/letter/b/f07891/32.png) [@Bill\_Walton](https://discuss.rubyonrails.org/u/Bill_Walton)\
**Post date:** [June 15, 2007, 2:07pm UTC](https://discuss.rubyonrails.org/t/error-when-running-functional-test-errno-enoent/14446/4 "2007-06-15T14:07:02Z")

</div>

Nickb wrote:

> Its always the simple things! Thanks for the help.

Been there. Done that. 😉 Glad to help.

Best regards, Bill
