public
Description: Ruby on Rails
Homepage: http://rubyonrails.org
Clone URL: git://github.com/rails/rails.git
Add back empty plugin folders that were lost when we moved to git.
josh (author)
Mon Apr 21 11:48:44 -0700 2008
commit  4ac33de4d61efe27454bbced7aece88604508bf1
tree    74184db2e61255ea3169173c6d1cf1e332bf5e4f
parent  1d09ccd949eb113601ee84c10a508d36c63c62b7
...
11
12
13
14
 
15
16
17
 
18
19
20
21
22
23
 
24
25
 
26
27
28
...
34
35
36
37
 
38
39
40
41
42
43
44
 
45
46
47
48
49
 
50
51
 
52
53
54
55
56
57
 
58
59
60
...
65
66
67
68
 
69
70
71
72
 
73
74
 
75
76
77
78
79
 
80
81
82
83
84
 
85
86
87
...
91
92
93
94
 
95
96
97
98
99
 
100
101
 
102
103
104
105
 
 
 
106
107
108
109
110
 
111
112
 
113
114
 
115
116
117
118
119
 
120
121
 
122
123
 
124
125
126
127
128
 
129
130
 
131
132
133
 
134
135
 
136
137
138
 
139
140
141
 
142
...
11
12
13
 
14
15
16
 
17
18
19
20
21
22
 
23
24
 
25
26
27
28
...
34
35
36
 
37
38
39
40
41
42
43
 
44
45
46
47
48
 
49
50
 
51
52
53
54
55
56
 
57
58
59
60
...
65
66
67
 
68
69
70
71
 
72
73
 
74
75
76
77
78
 
79
80
81
82
83
 
84
85
86
87
...
91
92
93
 
94
95
96
97
98
 
99
100
 
101
102
 
 
 
103
104
105
106
107
108
109
 
110
111
 
112
113
 
114
115
116
117
118
 
119
120
 
121
122
 
123
124
125
126
127
 
128
129
 
130
131
132
 
133
134
 
135
136
137
 
138
139
140
 
141
142
0
@@ -11,18 +11,18 @@ uses_mocha "Plugin Loader Tests" do
0
 
0
   class TestPluginLoader < Test::Unit::TestCase
0
     ORIGINAL_LOAD_PATH = $LOAD_PATH.dup
0
-
0
+
0
     def setup
0
       reset_load_path!
0
-
0
+
0
       @configuration = Rails::Configuration.new
0
       @configuration.plugin_paths << plugin_fixture_root_path
0
       @initializer = Rails::Initializer.new(@configuration)
0
       @valid_plugin_path = plugin_fixture_path('default/stubby')
0
       @empty_plugin_path = plugin_fixture_path('default/empty')
0
-
0
+
0
       @failure_tip = "It's likely someone has added a new plugin fixture without updating this list"
0
-
0
+
0
       @loader = Rails::Plugin::Loader.new(@initializer)
0
     end
0
 
0
@@ -34,27 +34,27 @@ uses_mocha "Plugin Loader Tests" do
0
       @configuration.plugin_locators = [locator_class_1, locator_class_2]
0
       assert_equal [:a, :b, :c, :d, :e, :f], @loader.send(:locate_plugins)
0
     end
0
-
0
+
0
     def test_should_memoize_the_result_of_locate_plugins_as_all_plugins
0
       plugin_list = [:a, :b, :c]
0
       @loader.expects(:locate_plugins).once.returns(plugin_list)
0
       assert_equal plugin_list, @loader.all_plugins
0
       assert_equal plugin_list, @loader.all_plugins # ensuring that locate_plugins isn't called again
0
     end
0
-
0
+
0
     def test_should_return_empty_array_if_configuration_plugins_is_empty
0
       @configuration.plugins = []
0
       assert_equal [], @loader.plugins
0
     end
0
-
0
+
0
     def test_should_find_all_availble_plugins_and_return_as_all_plugins
0
- assert_plugins [:a, :acts_as_chunky_bacon, :plugin_with_no_lib_dir, :stubby], @loader.all_plugins.reverse, @failure_tip
0
+ assert_plugins [:stubby, :plugin_with_no_lib_dir, :acts_as_chunky_bacon, :a], @loader.all_plugins.reverse, @failure_tip
0
     end
0
 
0
     def test_should_return_all_plugins_as_plugins_when_registered_plugin_list_is_untouched
0
       assert_plugins [:a, :acts_as_chunky_bacon, :plugin_with_no_lib_dir, :stubby], @loader.plugins, @failure_tip
0
     end
0
-
0
+
0
     def test_should_return_all_plugins_as_plugins_when_registered_plugin_list_is_nil
0
       @configuration.plugins = nil
0
       assert_plugins [:a, :acts_as_chunky_bacon, :plugin_with_no_lib_dir, :stubby], @loader.plugins, @failure_tip
0
@@ -65,23 +65,23 @@ uses_mocha "Plugin Loader Tests" do
0
       only_load_the_following_plugins! plugin_names
0
       assert_plugins plugin_names, @loader.plugins
0
     end
0
-
0
+
0
     def test_should_respect_the_order_of_plugins_given_in_configuration
0
       plugin_names = [:stubby, :acts_as_chunky_bacon]
0
       only_load_the_following_plugins! plugin_names
0
- assert_plugins plugin_names, @loader.plugins
0
+ assert_plugins plugin_names, @loader.plugins
0
     end
0
-
0
+
0
     def test_should_load_all_plugins_in_natural_order_when_all_is_used
0
       only_load_the_following_plugins! [:all]
0
       assert_plugins [:a, :acts_as_chunky_bacon, :plugin_with_no_lib_dir, :stubby], @loader.plugins, @failure_tip
0
     end
0
-
0
+
0
     def test_should_load_specified_plugins_in_order_and_then_all_remaining_plugins_when_all_is_used
0
       only_load_the_following_plugins! [:stubby, :acts_as_chunky_bacon, :all]
0
       assert_plugins [:stubby, :acts_as_chunky_bacon, :a, :plugin_with_no_lib_dir], @loader.plugins, @failure_tip
0
     end
0
-
0
+
0
     def test_should_be_able_to_specify_loading_of_plugins_loaded_after_all
0
       only_load_the_following_plugins! [:stubby, :all, :acts_as_chunky_bacon]
0
       assert_plugins [:stubby, :a, :plugin_with_no_lib_dir, :acts_as_chunky_bacon], @loader.plugins, @failure_tip
0
@@ -91,52 +91,52 @@ uses_mocha "Plugin Loader Tests" do
0
       only_load_the_following_plugins! ['stubby', 'acts_as_chunky_bacon', :a, :plugin_with_no_lib_dir]
0
       assert_plugins [:stubby, :acts_as_chunky_bacon, :a, :plugin_with_no_lib_dir], @loader.plugins, @failure_tip
0
     end
0
-
0
+
0
     def test_should_add_plugin_load_paths_to_global_LOAD_PATH_array
0
       only_load_the_following_plugins! [:stubby, :acts_as_chunky_bacon]
0
       stubbed_application_lib_index_in_LOAD_PATHS = 5
0
       @loader.stubs(:application_lib_index).returns(stubbed_application_lib_index_in_LOAD_PATHS)
0
-
0
+
0
       @loader.add_plugin_load_paths
0
-
0
+
0
       assert $LOAD_PATH.index(File.join(plugin_fixture_path('default/stubby'), 'lib')) >= stubbed_application_lib_index_in_LOAD_PATHS
0
- assert $LOAD_PATH.index(File.join(plugin_fixture_path('default/acts/acts_as_chunky_bacon'), 'lib')) >= stubbed_application_lib_index_in_LOAD_PATHS
0
- end
0
-
0
+ assert $LOAD_PATH.index(File.join(plugin_fixture_path('default/acts/acts_as_chunky_bacon'), 'lib')) >= stubbed_application_lib_index_in_LOAD_PATHS
0
+ end
0
+
0
     def test_should_add_plugin_load_paths_to_Dependencies_load_paths
0
       only_load_the_following_plugins! [:stubby, :acts_as_chunky_bacon]
0
 
0
       @loader.add_plugin_load_paths
0
-
0
+
0
       assert Dependencies.load_paths.include?(File.join(plugin_fixture_path('default/stubby'), 'lib'))
0
- assert Dependencies.load_paths.include?(File.join(plugin_fixture_path('default/acts/acts_as_chunky_bacon'), 'lib'))
0
+ assert Dependencies.load_paths.include?(File.join(plugin_fixture_path('default/acts/acts_as_chunky_bacon'), 'lib'))
0
     end
0
-
0
+
0
     def test_should_add_plugin_load_paths_to_Dependencies_load_once_paths
0
       only_load_the_following_plugins! [:stubby, :acts_as_chunky_bacon]
0
 
0
       @loader.add_plugin_load_paths
0
-
0
+
0
       assert Dependencies.load_once_paths.include?(File.join(plugin_fixture_path('default/stubby'), 'lib'))
0
- assert Dependencies.load_once_paths.include?(File.join(plugin_fixture_path('default/acts/acts_as_chunky_bacon'), 'lib'))
0
+ assert Dependencies.load_once_paths.include?(File.join(plugin_fixture_path('default/acts/acts_as_chunky_bacon'), 'lib'))
0
     end
0
-
0
+
0
     def test_should_add_all_load_paths_from_a_plugin_to_LOAD_PATH_array
0
       plugin_load_paths = ["a", "b"]
0
       plugin = stub(:load_paths => plugin_load_paths)
0
       @loader.stubs(:plugins).returns([plugin])
0
-
0
+
0
       @loader.add_plugin_load_paths
0
-
0
+
0
       plugin_load_paths.each { |path| assert $LOAD_PATH.include?(path) }
0
     end
0
-
0
+
0
     private
0
-
0
+
0
       def reset_load_path!
0
         $LOAD_PATH.clear
0
- ORIGINAL_LOAD_PATH.each { |path| $LOAD_PATH << path }
0
+ ORIGINAL_LOAD_PATH.each { |path| $LOAD_PATH << path }
0
       end
0
   end
0
-
0
+
0
 end

Comments

    No one has commented yet.