factory_data_preloader 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -8,8 +8,8 @@
|
|
8
8
|
patch_module = defined?(ActiveRecord::TestFixtures) ? ActiveRecord::TestFixtures : Test::Unit::TestCase
|
9
9
|
|
10
10
|
patch_module.class_eval do
|
11
|
-
def
|
12
|
-
val =
|
11
|
+
def setup_fixtures_with_preloaded_factory_data
|
12
|
+
val = setup_fixtures_without_preloaded_factory_data
|
13
13
|
FactoryData.preload_data!
|
14
14
|
val
|
15
15
|
end
|
@@ -19,7 +19,7 @@ patch_module.class_eval do
|
|
19
19
|
teardown_fixtures_without_preloaded_factory_data
|
20
20
|
end
|
21
21
|
|
22
|
-
alias_method_chain :
|
22
|
+
alias_method_chain :setup_fixtures, :preloaded_factory_data
|
23
23
|
alias_method_chain :teardown_fixtures, :preloaded_factory_data
|
24
24
|
end
|
25
25
|
|
data/test/test_helper.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'rubygems'
|
2
|
-
require 'test/unit'
|
3
2
|
require 'shoulda'
|
4
3
|
require 'sqlite3'
|
5
4
|
|
@@ -11,7 +10,6 @@ rescue LoadError
|
|
11
10
|
# ruby-debug wasn't available so neither can the debugging be
|
12
11
|
end
|
13
12
|
|
14
|
-
|
15
13
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
16
14
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
17
15
|
|