public
Fork of thoughtbot/shoulda
Description: Makes tests easy on the fingers and the eyes
Homepage: http://www.thoughtbot.com/projects/shoulda
Clone URL: git://github.com/rmm5t/shoulda.git
Rid the symlink behavior under test/rails_root/vendor/plugins
Ryan McGeary (author)
Thu Jul 03 07:19:28 -0700 2008
commit  512010ed62e992a6001c0da668e5a5b05362af26
tree    8495bae9419d2098e74febc61b001744783a571a
parent  9f8c29edf3e632cdbc9756f6c5792bdc8cc9494c
...
1
2
3
...
1
 
2
0
@@ -1,3 +1,2 @@
0
 test/rails_root/log/*.log
0
-test/rails_root/vendor/plugins/shoulda
0
 doc
...
8
9
10
 
11
12
13
...
15
16
17
18
19
20
21
...
8
9
10
11
12
13
14
...
16
17
18
 
19
20
21
0
@@ -8,6 +8,7 @@ The test directory contains the following files and subdirectories:
0
 ** the models, controllers, and views defined under app/
0
 ** the sqlite3.rb environment file
0
 ** a migration file for each model
0
+** a shoulda initializer that simulates loading the plugin but without relying on vendor/plugins
0
 * fixtures - contain the sample DB data for each model
0
 * functional - controller tests for each of the controllers under rails_root/app
0
 * unit - model tests for each of the models under rails_root/app
0
@@ -15,7 +16,6 @@ The test directory contains the following files and subdirectories:
0
 * test_helper.rb - responsible for initializing the test environment
0
 ** sets the rails_env to sqlite3
0
 ** sets the rails_root
0
-** creates the rails_root/vendor/plugins/shoulda symlink
0
 ** runs all the migrations against the in-memory sqlite3 db
0
 ** adds some magic to load the right fixture files
0
 
...
6
7
8
9
10
11
12
13
14
15
16
17
18
...
6
7
8
 
 
 
9
10
11
 
12
13
14
0
@@ -6,13 +6,9 @@ $VERBOSE = old_verbose
0
 require File.join(File.dirname(__FILE__), 'boot')
0
 
0
 Rails::Initializer.run do |config|
0
-  # Someday, I'm going to find a way of getting rid of that symlink...
0
-  # config.plugin_paths = ['../../../']
0
-  # config.plugins = [:shoulda]
0
   config.log_level = :debug
0
   config.cache_classes = false
0
   config.whiny_nils = true
0
-  # config.load_paths << File.join(File.dirname(__FILE__), *%w{.. .. .. lib})
0
 end
0
  
0
 # Dependencies.log_activity = true
...
2
3
4
5
6
7
8
9
10
11
12
...
19
20
21
22
23
24
25
...
2
3
4
 
5
6
 
 
7
8
9
...
16
17
18
 
19
20
21
0
@@ -2,11 +2,8 @@ require 'fileutils'
0
 # Load the environment
0
 ENV['RAILS_ENV'] = 'sqlite3'
0
 
0
-# ln rails_root/vendor/plugins/shoulda => ../../../../
0
 rails_root = File.dirname(__FILE__) + '/rails_root'
0
 
0
-FileUtils.ln_s('../../../../', "#{rails_root}/vendor/plugins/shoulda") unless File.exists?("#{rails_root}/vendor/plugins/shoulda")
0
-
0
 require "#{rails_root}/config/environment.rb"
0
  
0
 # Load the testing framework
0
@@ -19,7 +16,6 @@ ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate")
0
  
0
 # Setup the fixtures path
0
 Test::Unit::TestCase.fixture_path = File.join(File.dirname(__FILE__), "fixtures")
0
-# $LOAD_PATH.unshift(Test::Unit::TestCase.fixture_path)
0
 
0
 class Test::Unit::TestCase #:nodoc:
0
   def create_fixtures(*table_names)

Comments