Here’s my problem. If I run the test using the ruby command the tests all pass. However, if I use the rake test:functionals they all fail with the error below. I’m not sure what I have to do differently to get them to pass when using the rake task, but I’d greatly appreciate any guidance you might offer.
#tasks_controller_test.rb
require File.dirname(__FILE__) + '/../test_helper'
class TasksControllerTest < ActionController::TestCase
set_fixture_class :Action => 'Task'
fixtures :Action
setup :initialize_test
test "the truth" do
assert true
end
private
def initialize_test
@user = users :one
sign_in @user
@user.confirm!
@task = Action :one # Here's the line that is throwing the error.
end
end
1) Error:
test_the_truth(TasksControllerTest):
FixtureClassNotFound: No class attached to find.
test/functional/tasks_controller_test.rb:20:in `initialize_test'
It looks like no one is able to solve this problem. So I’m simply closing it at this point. Perhaps I’ll switch over to Factory_Girl or Machinist.