activesambaldap 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. data/Gemfile +21 -0
  2. data/NEWS.en +1 -1
  3. data/NEWS.ja +1 -1
  4. data/README.en +12 -8
  5. data/README.ja +6 -3
  6. data/Rakefile +27 -121
  7. data/lib/active_samba_ldap.rb +1 -1
  8. data/lib/active_samba_ldap/get_text_support.rb +1 -1
  9. data/lib/active_samba_ldap/version.rb +1 -1
  10. data/license/lgpl-2.1.txt +165 -0
  11. data/po/ja/active-samba-ldap.po +2 -2
  12. data/test/run-test.rb +3 -3
  13. metadata +145 -277
  14. data/bin/asl-groupadd.help +0 -16
  15. data/bin/asl-groupdel.help +0 -13
  16. data/bin/asl-groupmod.help +0 -19
  17. data/bin/asl-groupshow.help +0 -11
  18. data/bin/asl-passwd.help +0 -15
  19. data/bin/asl-populate.help +0 -28
  20. data/bin/asl-purge.help +0 -11
  21. data/bin/asl-samba-computeradd.help +0 -13
  22. data/bin/asl-samba-groupadd.help +0 -11
  23. data/bin/asl-samba-groupdel.help +0 -11
  24. data/bin/asl-samba-groupmod.help +0 -15
  25. data/bin/asl-samba-useradd.help +0 -13
  26. data/bin/asl-samba-userdel.help +0 -11
  27. data/bin/asl-samba-usermod.help +0 -15
  28. data/bin/asl-useradd.help +0 -49
  29. data/bin/asl-userdel.help +0 -18
  30. data/bin/asl-usermod.help +0 -47
  31. data/bin/asl-usershow.help +0 -11
  32. data/data/locale/ja/LC_MESSAGES/active-samba-ldap.mo +0 -0
  33. data/example/asl-admin/README +0 -243
  34. data/example/asl-admin/Rakefile +0 -10
  35. data/example/asl-admin/app/controllers/application_controller.rb +0 -10
  36. data/example/asl-admin/app/controllers/samba_controller.rb +0 -12
  37. data/example/asl-admin/app/helpers/application_helper.rb +0 -3
  38. data/example/asl-admin/app/helpers/samba_helper.rb +0 -2
  39. data/example/asl-admin/app/models/computer.rb +0 -3
  40. data/example/asl-admin/app/models/dc.rb +0 -3
  41. data/example/asl-admin/app/models/group.rb +0 -3
  42. data/example/asl-admin/app/models/idmap.rb +0 -3
  43. data/example/asl-admin/app/models/ou.rb +0 -3
  44. data/example/asl-admin/app/models/unix_id_pool.rb +0 -3
  45. data/example/asl-admin/app/models/user.rb +0 -3
  46. data/example/asl-admin/app/views/samba/index.html.erb +0 -17
  47. data/example/asl-admin/app/views/samba/populate.html.erb +0 -15
  48. data/example/asl-admin/app/views/samba/purge.html.erb +0 -10
  49. data/example/asl-admin/config/boot.rb +0 -110
  50. data/example/asl-admin/config/database.yml +0 -22
  51. data/example/asl-admin/config/environment.rb +0 -48
  52. data/example/asl-admin/config/environments/development.rb +0 -17
  53. data/example/asl-admin/config/environments/production.rb +0 -28
  54. data/example/asl-admin/config/environments/test.rb +0 -28
  55. data/example/asl-admin/config/initializers/backtrace_silencers.rb +0 -7
  56. data/example/asl-admin/config/initializers/inflections.rb +0 -10
  57. data/example/asl-admin/config/initializers/mime_types.rb +0 -5
  58. data/example/asl-admin/config/initializers/new_rails_defaults.rb +0 -19
  59. data/example/asl-admin/config/initializers/session_store.rb +0 -15
  60. data/example/asl-admin/config/ldap.yml.sample +0 -24
  61. data/example/asl-admin/config/locales/en.yml +0 -5
  62. data/example/asl-admin/config/routes.rb +0 -43
  63. data/example/asl-admin/log/test.log +0 -5
  64. data/example/asl-admin/public/404.html +0 -30
  65. data/example/asl-admin/public/422.html +0 -30
  66. data/example/asl-admin/public/500.html +0 -30
  67. data/example/asl-admin/public/favicon.ico +0 -0
  68. data/example/asl-admin/public/images/rails.png +0 -0
  69. data/example/asl-admin/public/index.html +0 -275
  70. data/example/asl-admin/public/javascripts/application.js +0 -2
  71. data/example/asl-admin/public/javascripts/controls.js +0 -963
  72. data/example/asl-admin/public/javascripts/dragdrop.js +0 -973
  73. data/example/asl-admin/public/javascripts/effects.js +0 -1128
  74. data/example/asl-admin/public/javascripts/prototype.js +0 -4320
  75. data/example/asl-admin/public/robots.txt +0 -5
  76. data/example/asl-admin/script/about +0 -4
  77. data/example/asl-admin/script/console +0 -3
  78. data/example/asl-admin/script/dbconsole +0 -3
  79. data/example/asl-admin/script/destroy +0 -3
  80. data/example/asl-admin/script/generate +0 -3
  81. data/example/asl-admin/script/performance/benchmarker +0 -3
  82. data/example/asl-admin/script/performance/profiler +0 -3
  83. data/example/asl-admin/script/plugin +0 -3
  84. data/example/asl-admin/script/runner +0 -3
  85. data/example/asl-admin/script/server +0 -3
  86. data/example/asl-admin/test/performance/browsing_test.rb +0 -9
  87. data/example/asl-admin/test/test_helper.rb +0 -38
  88. data/po/active-samba-ldap.pot +0 -463
  89. data/rails_generators/scaffold_active_samba_ldap/scaffold_active_samba_ldap_generator.rb +0 -28
  90. data/rails_generators/scaffold_active_samba_ldap/templates/computer.rb +0 -3
  91. data/rails_generators/scaffold_active_samba_ldap/templates/dc.rb +0 -3
  92. data/rails_generators/scaffold_active_samba_ldap/templates/group.rb +0 -3
  93. data/rails_generators/scaffold_active_samba_ldap/templates/idmap.rb +0 -3
  94. data/rails_generators/scaffold_active_samba_ldap/templates/ldap.yml +0 -24
  95. data/rails_generators/scaffold_active_samba_ldap/templates/ou.rb +0 -3
  96. data/rails_generators/scaffold_active_samba_ldap/templates/samba_controller.rb +0 -12
  97. data/rails_generators/scaffold_active_samba_ldap/templates/samba_helper.rb +0 -2
  98. data/rails_generators/scaffold_active_samba_ldap/templates/samba_index.html.erb +0 -17
  99. data/rails_generators/scaffold_active_samba_ldap/templates/samba_populate.html.erb +0 -15
  100. data/rails_generators/scaffold_active_samba_ldap/templates/samba_purge.html.erb +0 -10
  101. data/rails_generators/scaffold_active_samba_ldap/templates/unix_id_pool.rb +0 -3
  102. data/rails_generators/scaffold_active_samba_ldap/templates/user.rb +0 -3
  103. data/setup.rb +0 -1585
  104. data/test-unit/History.txt +0 -107
  105. data/test-unit/README.txt +0 -52
  106. data/test-unit/Rakefile +0 -40
  107. data/test-unit/TODO +0 -5
  108. data/test-unit/bin/testrb +0 -5
  109. data/test-unit/lib/test/unit.rb +0 -342
  110. data/test-unit/lib/test/unit/assertionfailederror.rb +0 -14
  111. data/test-unit/lib/test/unit/assertions.rb +0 -1149
  112. data/test-unit/lib/test/unit/attribute.rb +0 -125
  113. data/test-unit/lib/test/unit/autorunner.rb +0 -344
  114. data/test-unit/lib/test/unit/collector.rb +0 -43
  115. data/test-unit/lib/test/unit/collector/descendant.rb +0 -23
  116. data/test-unit/lib/test/unit/collector/dir.rb +0 -108
  117. data/test-unit/lib/test/unit/collector/load.rb +0 -137
  118. data/test-unit/lib/test/unit/collector/objectspace.rb +0 -34
  119. data/test-unit/lib/test/unit/color-scheme.rb +0 -90
  120. data/test-unit/lib/test/unit/color.rb +0 -96
  121. data/test-unit/lib/test/unit/diff.rb +0 -538
  122. data/test-unit/lib/test/unit/error.rb +0 -126
  123. data/test-unit/lib/test/unit/exceptionhandler.rb +0 -39
  124. data/test-unit/lib/test/unit/failure.rb +0 -110
  125. data/test-unit/lib/test/unit/fixture.rb +0 -176
  126. data/test-unit/lib/test/unit/notification.rb +0 -125
  127. data/test-unit/lib/test/unit/omission.rb +0 -143
  128. data/test-unit/lib/test/unit/pending.rb +0 -146
  129. data/test-unit/lib/test/unit/priority.rb +0 -181
  130. data/test-unit/lib/test/unit/runner/console.rb +0 -52
  131. data/test-unit/lib/test/unit/runner/emacs.rb +0 -8
  132. data/test-unit/lib/test/unit/runner/tap.rb +0 -8
  133. data/test-unit/lib/test/unit/testcase.rb +0 -425
  134. data/test-unit/lib/test/unit/testresult.rb +0 -89
  135. data/test-unit/lib/test/unit/testsuite.rb +0 -110
  136. data/test-unit/lib/test/unit/ui/console/outputlevel.rb +0 -14
  137. data/test-unit/lib/test/unit/ui/console/testrunner.rb +0 -278
  138. data/test-unit/lib/test/unit/ui/emacs/testrunner.rb +0 -49
  139. data/test-unit/lib/test/unit/ui/tap/testrunner.rb +0 -92
  140. data/test-unit/lib/test/unit/ui/testrunner.rb +0 -20
  141. data/test-unit/lib/test/unit/ui/testrunnermediator.rb +0 -77
  142. data/test-unit/lib/test/unit/ui/testrunnerutilities.rb +0 -41
  143. data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -41
  144. data/test-unit/lib/test/unit/util/method-owner-finder.rb +0 -28
  145. data/test-unit/lib/test/unit/util/observable.rb +0 -90
  146. data/test-unit/lib/test/unit/util/procwrapper.rb +0 -48
  147. data/test-unit/lib/test/unit/version.rb +0 -7
  148. data/test-unit/sample/adder.rb +0 -13
  149. data/test-unit/sample/subtracter.rb +0 -12
  150. data/test-unit/sample/tc_adder.rb +0 -18
  151. data/test-unit/sample/tc_subtracter.rb +0 -18
  152. data/test-unit/sample/test_user.rb +0 -22
  153. data/test-unit/sample/ts_examples.rb +0 -7
  154. data/test-unit/test/collector/test-descendant.rb +0 -135
  155. data/test-unit/test/collector/test-load.rb +0 -329
  156. data/test-unit/test/collector/test_dir.rb +0 -406
  157. data/test-unit/test/collector/test_objectspace.rb +0 -98
  158. data/test-unit/test/run-test.rb +0 -13
  159. data/test-unit/test/test-attribute.rb +0 -86
  160. data/test-unit/test/test-color-scheme.rb +0 -60
  161. data/test-unit/test/test-color.rb +0 -47
  162. data/test-unit/test/test-diff.rb +0 -477
  163. data/test-unit/test/test-emacs-runner.rb +0 -60
  164. data/test-unit/test/test-fixture.rb +0 -287
  165. data/test-unit/test/test-notification.rb +0 -33
  166. data/test-unit/test/test-omission.rb +0 -81
  167. data/test-unit/test/test-pending.rb +0 -70
  168. data/test-unit/test/test-priority.rb +0 -119
  169. data/test-unit/test/test-testcase.rb +0 -507
  170. data/test-unit/test/test_assertions.rb +0 -1082
  171. data/test-unit/test/test_error.rb +0 -26
  172. data/test-unit/test/test_failure.rb +0 -33
  173. data/test-unit/test/test_testresult.rb +0 -113
  174. data/test-unit/test/test_testsuite.rb +0 -129
  175. data/test-unit/test/testunit-test-util.rb +0 -14
  176. data/test-unit/test/ui/test_testrunmediator.rb +0 -20
  177. data/test-unit/test/util/test-method-owner-finder.rb +0 -38
  178. data/test-unit/test/util/test_backtracefilter.rb +0 -41
  179. data/test-unit/test/util/test_observable.rb +0 -102
  180. data/test-unit/test/util/test_procwrapper.rb +0 -36
@@ -1,52 +0,0 @@
1
- module Test
2
- module Unit
3
- AutoRunner.register_runner(:console) do |auto_runner|
4
- require 'test/unit/ui/console/testrunner'
5
- Test::Unit::UI::Console::TestRunner
6
- end
7
-
8
- AutoRunner.setup_option do |auto_runner, opts|
9
- require 'test/unit/ui/console/outputlevel'
10
-
11
- output_levels = [
12
- [:silent, UI::Console::OutputLevel::SILENT],
13
- [:progress, UI::Console::OutputLevel::PROGRESS_ONLY],
14
- [:normal, UI::Console::OutputLevel::NORMAL],
15
- [:verbose, UI::Console::OutputLevel::VERBOSE],
16
- ]
17
- opts.on('-v', '--verbose=[LEVEL]', output_levels,
18
- "Set the output level (default is verbose).",
19
- "(#{auto_runner.keyword_display(output_levels)})") do |level|
20
- level ||= output_levels.assoc(:verbose)[1]
21
- auto_runner.runner_options[:output_level] = level
22
- end
23
-
24
- use_color_options = [
25
- [:auto, :auto],
26
- ["-", false],
27
- ["no", false],
28
- ["false", false],
29
- ["+", true],
30
- ["yes", true],
31
- ["true", true],
32
- ]
33
- opts.on("--[no-]use-color=[auto]", use_color_options,
34
- "Uses color output",
35
- "(default is auto)") do |use_color|
36
- case use_color
37
- when nil
38
- use_color = true
39
- when :auto
40
- use_color = nil
41
- end
42
- auto_runner.runner_options[:use_color] = use_color
43
- end
44
-
45
- opts.on("--progress-row-max=MAX", Integer,
46
- "Uses MAX as max terminal width for progress mark",
47
- "(default is auto)") do |max|
48
- auto_runner.runner_options[:progress_row_max] = max
49
- end
50
- end
51
- end
52
- end
@@ -1,8 +0,0 @@
1
- module Test
2
- module Unit
3
- AutoRunner.register_runner(:emacs) do |auto_runner|
4
- require 'test/unit/ui/emacs/testrunner'
5
- Test::Unit::UI::Emacs::TestRunner
6
- end
7
- end
8
- end
@@ -1,8 +0,0 @@
1
- module Test
2
- module Unit
3
- AutoRunner.register_runner(:tap) do |auto_runner|
4
- require 'test/unit/ui/tap/testrunner'
5
- Test::Unit::UI::Tap::TestRunner
6
- end
7
- end
8
- end
@@ -1,425 +0,0 @@
1
- #--
2
- #
3
- # Author:: Nathaniel Talbott.
4
- # Copyright::
5
- # * Copyright (c) 2000-2003 Nathaniel Talbott. All rights reserved.
6
- # * Copyright (c) 2008-2009 Kouhei Sutou <tt><kou@clear-code.com></tt>
7
- # License:: Ruby license.
8
-
9
- require 'test/unit/attribute'
10
- require 'test/unit/fixture'
11
- require 'test/unit/exceptionhandler'
12
- require 'test/unit/assertions'
13
- require 'test/unit/failure'
14
- require 'test/unit/error'
15
- require 'test/unit/pending'
16
- require 'test/unit/omission'
17
- require 'test/unit/notification'
18
- require 'test/unit/priority'
19
- require 'test/unit/testsuite'
20
- require 'test/unit/assertionfailederror'
21
- require 'test/unit/util/backtracefilter'
22
- require 'test/unit/util/method-owner-finder'
23
-
24
- module Test
25
- module Unit
26
-
27
- # Ties everything together. If you subclass and add your own
28
- # test methods, it takes care of making them into tests and
29
- # wrapping those tests into a suite. It also does the
30
- # nitty-gritty of actually running an individual test and
31
- # collecting its results into a Test::Unit::TestResult object.
32
- #
33
- # You can run two hooks before/after a TestCase run.
34
- #
35
- # Example:
36
- # class TestMyClass < Test::Unit::TestCase
37
- # class << self
38
- # def startup
39
- # ...
40
- # end
41
- #
42
- # def shutdown
43
- # ...
44
- # end
45
- # end
46
- #
47
- # def setup
48
- # ...
49
- # end
50
- #
51
- # def teardown
52
- # ...
53
- # end
54
- #
55
- # def test_my_method1
56
- # ...
57
- # end
58
- #
59
- # def test_my_method2
60
- # ...
61
- # end
62
- # end
63
- #
64
- # Here is a call order:
65
- # * startup
66
- # * setup
67
- # * test_my_method1
68
- # * teardown
69
- # * setup
70
- # * test_my_method2
71
- # * teardown
72
- # * shutdown
73
- class TestCase
74
- include Attribute
75
- include Fixture
76
- include ExceptionHandler
77
- include ErrorHandler
78
- include FailureHandler
79
- include TestCasePendingSupport
80
- include TestCaseOmissionSupport
81
- include TestCaseNotificationSupport
82
- include Priority
83
- include Assertions
84
- include Util::BacktraceFilter
85
-
86
- STARTED = name + "::STARTED" # :nodoc:
87
- FINISHED = name + "::FINISHED" # :nodoc:
88
-
89
- DESCENDANTS = [] # :nodoc:
90
- AVAILABLE_ORDERS = [:alphabetic, :random, :defined] # :nodoc:
91
-
92
- class << self
93
- def inherited(sub_class) # :nodoc:
94
- DESCENDANTS << sub_class
95
- end
96
-
97
- @@added_methods = []
98
- def method_added(name) # :nodoc:
99
- super
100
- @@added_methods << name.to_s
101
- end
102
-
103
- # Rolls up all of the test* methods in the fixture into
104
- # one suite, creating a new instance of the fixture for
105
- # each method.
106
- def suite
107
- suite = TestSuite.new(name, self)
108
- collect_test_names.each do |test|
109
- catch(:invalid_test) do
110
- suite << new(test)
111
- end
112
- end
113
- if suite.empty?
114
- catch(:invalid_test) do
115
- suite << new("default_test")
116
- end
117
- end
118
- suite
119
- end
120
-
121
- # Called before every test case runs. Can be used
122
- # to set up fixture information used in test case
123
- # scope.
124
- #
125
- # Here is an example test case:
126
- # class TestMyClass < Test::Unit::TestCase
127
- # class << self
128
- # def startup
129
- # ...
130
- # end
131
- # end
132
- #
133
- # def setup
134
- # ...
135
- # end
136
- #
137
- # def test_my_class1
138
- # ...
139
- # end
140
- #
141
- # def test_my_class2
142
- # ...
143
- # end
144
- # end
145
- #
146
- # Here is a call order:
147
- # * startup
148
- # * setup
149
- # * test_my_class1 (or test_my_class2)
150
- # * setup
151
- # * test_my_class2 (or test_my_class1)
152
- #
153
- # Note that you should not assume test order. Tests
154
- # should be worked in any order.
155
- def startup
156
- end
157
-
158
- # Called after every test case runs. Can be used to tear
159
- # down fixture information used in test case scope.
160
- #
161
- # Here is an example test case:
162
- # class TestMyClass < Test::Unit::TestCase
163
- # class << self
164
- # def shutdown
165
- # ...
166
- # end
167
- # end
168
- #
169
- # def teardown
170
- # ...
171
- # end
172
- #
173
- # def test_my_class1
174
- # ...
175
- # end
176
- #
177
- # def test_my_class2
178
- # ...
179
- # end
180
- # end
181
- #
182
- # Here is a call order:
183
- # * test_my_class1 (or test_my_class2)
184
- # * teardown
185
- # * test_my_class2 (or test_my_class1)
186
- # * teardown
187
- # * shutdown
188
- #
189
- # Note that you should not assume test order. Tests
190
- # should be worked in any order.
191
- def shutdown
192
- end
193
-
194
- @@test_order = AVAILABLE_ORDERS.first
195
-
196
- # Returns the current test order. This returns
197
- # +:alphabetic+ by default.
198
- def test_order
199
- @@test_order
200
- end
201
-
202
- # Sets the current test order.
203
- #
204
- # Here are the available _order_:
205
- # [:alphabetic]
206
- # Default. Tests are sorted in alphabetic order.
207
- # [:random]
208
- # Tests are sorted in random order.
209
- # [:defined]
210
- # Tests are sorted in defined order.
211
- def test_order=(order)
212
- @@test_order = order
213
- end
214
-
215
- # :stopdoc:
216
- private
217
- def collect_test_names
218
- method_names = public_instance_methods(true).collect do |name|
219
- name.to_s
220
- end
221
- test_names = method_names.find_all do |method_name|
222
- method_name =~ /^test./
223
- end
224
- send("sort_test_names_in_#{test_order}_order", test_names)
225
- end
226
-
227
- def sort_test_names_in_alphabetic_order(test_names)
228
- test_names.sort
229
- end
230
-
231
- def sort_test_names_in_random_order(test_names)
232
- test_names.sort_by {rand(test_names.size)}
233
- end
234
-
235
- def sort_test_names_in_defined_order(test_names)
236
- test_names.sort do |test1, test2|
237
- test1_defined_order = @@added_methods.index(test1)
238
- test2_defined_order = @@added_methods.index(test2)
239
- if test1_defined_order and test2_defined_order
240
- test1_defined_order <=> test2_defined_order
241
- elsif test1_defined_order
242
- 1
243
- elsif test2_defined_order
244
- -1
245
- else
246
- test1 <=> test2
247
- end
248
- end
249
- end
250
- # :startdoc:
251
- end
252
-
253
- attr_reader :method_name
254
-
255
- # Creates a new instance of the fixture for running the
256
- # test represented by test_method_name.
257
- def initialize(test_method_name)
258
- throw :invalid_test unless respond_to?(test_method_name)
259
- test_method = method(test_method_name)
260
- throw :invalid_test if test_method.arity > 0
261
- owner = Util::MethodOwnerFinder.find(self, test_method_name)
262
- if owner.class != Module and self.class != owner
263
- throw :invalid_test
264
- end
265
- @method_name = test_method_name
266
- @test_passed = true
267
- @interrupted = false
268
- end
269
-
270
- # Runs the individual test method represented by this
271
- # instance of the fixture, collecting statistics, failures
272
- # and errors in result.
273
- def run(result)
274
- begin
275
- @_result = result
276
- yield(STARTED, name)
277
- begin
278
- run_setup
279
- run_test
280
- rescue Exception
281
- @interrupted = true
282
- raise unless handle_exception($!)
283
- ensure
284
- begin
285
- run_teardown
286
- rescue Exception
287
- raise unless handle_exception($!)
288
- end
289
- end
290
- result.add_run
291
- yield(FINISHED, name)
292
- ensure
293
- # @_result = nil # For test-spec's after_all :<
294
- end
295
- end
296
-
297
- # Called before every test method runs. Can be used
298
- # to set up fixture information.
299
- #
300
- # You can add additional setup tasks by the following
301
- # code:
302
- # class TestMyClass < Test::Unit::TestCase
303
- # def setup
304
- # ...
305
- # end
306
- #
307
- # setup
308
- # def my_setup1
309
- # ...
310
- # end
311
- #
312
- # setup
313
- # def my_setup2
314
- # ...
315
- # end
316
- #
317
- # def test_my_class
318
- # ...
319
- # end
320
- # end
321
- #
322
- # Here is a call order:
323
- # * setup
324
- # * my_setup1
325
- # * my_setup2
326
- # * test_my_class
327
- def setup
328
- end
329
-
330
- # Called after every test method runs. Can be used to tear
331
- # down fixture information.
332
- #
333
- # You can add additional teardown tasks by the following
334
- # code:
335
- # class TestMyClass < Test::Unit::TestCase
336
- # def teardown
337
- # ...
338
- # end
339
- #
340
- # teardown
341
- # def my_teardown1
342
- # ...
343
- # end
344
- #
345
- # teardown
346
- # def my_teardown2
347
- # ...
348
- # end
349
- #
350
- # def test_my_class
351
- # ...
352
- # end
353
- # end
354
- #
355
- # Here is a call order:
356
- # * test_my_class
357
- # * my_teardown2
358
- # * my_teardown1
359
- # * teardown
360
- def teardown
361
- end
362
-
363
- def default_test
364
- flunk("No tests were specified")
365
- end
366
-
367
- def size
368
- 1
369
- end
370
-
371
- # Returns a human-readable name for the specific test that
372
- # this instance of TestCase represents.
373
- def name
374
- "#{@method_name}(#{self.class.name})"
375
- end
376
-
377
- # Overridden to return #name.
378
- def to_s
379
- name
380
- end
381
-
382
- # It's handy to be able to compare TestCase instances.
383
- def ==(other)
384
- return false unless(other.kind_of?(self.class))
385
- return false unless(@method_name == other.method_name)
386
- self.class == other.class
387
- end
388
-
389
- def interrupted?
390
- @interrupted
391
- end
392
-
393
- private
394
- def current_result
395
- @_result
396
- end
397
-
398
- def run_test
399
- __send__(@method_name)
400
- end
401
-
402
- def handle_exception(exception)
403
- self.class.exception_handlers.each do |handler|
404
- return true if send(handler, exception)
405
- end
406
- false
407
- end
408
-
409
- # Returns whether this individual test passed or
410
- # not. Primarily for use in teardown so that artifacts
411
- # can be left behind if the test fails.
412
- def passed?
413
- @test_passed
414
- end
415
-
416
- def problem_occurred
417
- @test_passed = false
418
- end
419
-
420
- def add_assertion
421
- current_result.add_assertion
422
- end
423
- end
424
- end
425
- end