"rake test" doesn't load fixtures?
Posted
by Pavel K.
on Stack Overflow
See other posts from Stack Overflow
or by Pavel K.
Published on 2010-04-22T10:41:21Z
Indexed on
2010/04/22
10:43 UTC
Read the original article
Hit count: 200
when i run
rake test --trace
here's what happens
** Invoke test (first_time)
** Execute test
** Invoke test:units (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:abort_if_pending_migrations
** Execute db:test:prepare
** Invoke db:test:load (first_time)
** Invoke db:test:purge (first_time)
** Invoke environment
** Execute db:test:purge
** Execute db:test:load
** Invoke db:schema:load (first_time)
** Invoke environment
** Execute db:schema:load
** Execute test:units
/usr/bin/ruby1.8 -I"lib:test".... (and after that fails because there's no fixtures loaded)
why doesn't it load fixtures (i thought that would be default behaviour) and how do i make it load fixtures before executing tests???
p.s.
my test/test_helper.rb content is:
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
class ActiveSupport::TestCase
self.use_transactional_fixtures = true
self.use_instantiated_fixtures = false
fixtures :all
end
(rails 2.3.4)
© Stack Overflow or respective owner