Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Standardize require lines.

Since 1.8 does not canonicalize the filename that is required,
the same file can be required multiple time. This is particularly
true for spec_helper.rb, however it could also affect execution
of the specs. On 1.9, the path is canonicalized. Using
File.expand_path should eliminate this difference on 1.8 and 1.9.
  • Loading branch information...
commit 957c2c9c5b1d381211accaff7fefd030172d0a9f 1 parent 5bd2b9c
@brixen brixen authored
Showing with 538 additions and 538 deletions.
  1. +1 −1  command_line/dash_d_spec.rb
  2. +1 −1  command_line/dash_e_spec.rb
  3. +1 −1  command_line/dash_r_spec.rb
  4. +1 −1  command_line/dash_upper_i_spec.rb
  5. +2 −2 command_line/dash_upper_w_spec.rb
  6. +2 −2 command_line/dash_v_spec.rb
  7. +2 −2 command_line/dash_w_spec.rb
  8. +1 −1  core/argf/argf_spec.rb
  9. +1 −1  core/argf/binmode_spec.rb
  10. +2 −2 core/argf/bytes_spec.rb
  11. +2 −2 core/argf/chars_spec.rb
  12. +1 −1  core/argf/close_spec.rb
  13. +1 −1  core/argf/closed_spec.rb
  14. +2 −2 core/argf/each_byte_spec.rb
  15. +2 −2 core/argf/each_char_spec.rb
  16. +2 −2 core/argf/each_line_spec.rb
  17. +2 −2 core/argf/each_spec.rb
  18. +2 −2 core/argf/eof_spec.rb
  19. +1 −1  core/argf/file_spec.rb
  20. +2 −2 core/argf/filename_spec.rb
  21. +2 −2 core/argf/fileno_spec.rb
  22. +2 −2 core/argf/getc_spec.rb
  23. +2 −2 core/argf/gets_spec.rb
  24. +1 −1  core/argf/lineno_spec.rb
  25. +2 −2 core/argf/path_spec.rb
  26. +2 −2 core/argf/pos_spec.rb
  27. +1 −1  core/argf/read_spec.rb
  28. +2 −2 core/argf/readchar_spec.rb
  29. +2 −2 core/argf/readline_spec.rb
  30. +2 −2 core/argf/readlines_spec.rb
  31. +1 −1  core/argf/rewind_spec.rb
  32. +1 −1  core/argf/seek_spec.rb
  33. +1 −1  core/argf/skip_spec.rb
  34. +2 −2 core/argf/tell_spec.rb
  35. +2 −2 core/argf/to_a_spec.rb
  36. +2 −2 core/argf/to_i_spec.rb
  37. +1 −1  core/argf/to_io_spec.rb
  38. +1 −1  core/argf/to_s_spec.rb
  39. +1 −1  core/array/allocate_spec.rb
  40. +2 −2 core/array/append_spec.rb
  41. +1 −1  core/array/array_spec.rb
  42. +2 −2 core/array/assoc_spec.rb
  43. +2 −2 core/array/at_spec.rb
  44. +2 −2 core/array/choice_spec.rb
  45. +2 −2 core/array/clear_spec.rb
  46. +3 −3 core/array/clone_spec.rb
  47. +3 −3 core/array/collect_spec.rb
  48. +1 −1  core/array/combination_spec.rb
  49. +2 −2 core/array/compact_spec.rb
  50. +2 −2 core/array/comparison_spec.rb
  51. +2 −2 core/array/concat_spec.rb
  52. +2 −2 core/array/constructor_spec.rb
  53. +2 −2 core/array/delete_at_spec.rb
  54. +3 −3 core/array/delete_if_spec.rb
  55. +2 −2 core/array/delete_spec.rb
  56. +3 −3 core/array/dup_spec.rb
  57. +3 −3 core/array/each_index_spec.rb
  58. +3 −3 core/array/each_spec.rb
  59. +3 −3 core/array/element_reference_spec.rb
  60. +2 −2 core/array/element_set_spec.rb
  61. +2 −2 core/array/empty_spec.rb
  62. +3 −3 core/array/eql_spec.rb
  63. +3 −3 core/array/equal_value_spec.rb
  64. +2 −2 core/array/fetch_spec.rb
  65. +2 −2 core/array/fill_spec.rb
  66. +2 −2 core/array/first_spec.rb
  67. +2 −2 core/array/flatten_spec.rb
  68. +2 −2 core/array/frozen_spec.rb
  69. +2 −2 core/array/hash_spec.rb
  70. +2 −2 core/array/include_spec.rb
  71. +1 −1  core/array/index_spec.rb
  72. +3 −3 core/array/indexes_spec.rb
  73. +3 −3 core/array/indices_spec.rb
  74. +3 −3 core/array/initialize_copy_spec.rb
  75. +2 −2 core/array/initialize_spec.rb
  76. +2 −2 core/array/insert_spec.rb
  77. +2 −2 core/array/inspect_spec.rb
  78. +2 −2 core/array/intersection_spec.rb
  79. +2 −2 core/array/join_spec.rb
  80. +2 −2 core/array/last_spec.rb
  81. +3 −3 core/array/length_spec.rb
  82. +3 −3 core/array/map_spec.rb
  83. +2 −2 core/array/minus_spec.rb
  84. +2 −2 core/array/multiply_spec.rb
  85. +2 −2 core/array/new_spec.rb
  86. +2 −2 core/array/nitems_spec.rb
  87. +2 −2 core/array/pack_spec.rb
  88. +2 −2 core/array/partition_spec.rb
  89. +2 −2 core/array/permutation_spec.rb
  90. +2 −2 core/array/plus_spec.rb
  91. +2 −2 core/array/pop_spec.rb
  92. +2 −2 core/array/product_spec.rb
  93. +2 −2 core/array/push_spec.rb
  94. +2 −2 core/array/rassoc_spec.rb
  95. +3 −3 core/array/reject_spec.rb
  96. +3 −3 core/array/replace_spec.rb
  97. +3 −3 core/array/reverse_each_spec.rb
  98. +2 −2 core/array/reverse_spec.rb
  99. +2 −2 core/array/rindex_spec.rb
  100. +2 −2 core/array/rotate_spec.rb
  101. +2 −2 core/array/sample_spec.rb
  102. +3 −3 core/array/select_spec.rb
  103. +2 −2 core/array/shift_spec.rb
  104. +2 −2 core/array/shuffle_spec.rb
  105. +3 −3 core/array/size_spec.rb
  106. +3 −3 core/array/slice_spec.rb
  107. +2 −2 core/array/sort_by_spec.rb
  108. +2 −2 core/array/sort_spec.rb
  109. +2 −2 core/array/to_a_spec.rb
  110. +2 −2 core/array/to_ary_spec.rb
  111. +2 −2 core/array/to_s_spec.rb
  112. +2 −2 core/array/transpose_spec.rb
  113. +2 −2 core/array/try_convert_spec.rb
  114. +2 −2 core/array/union_spec.rb
  115. +2 −2 core/array/uniq_spec.rb
  116. +2 −2 core/array/unshift_spec.rb
  117. +2 −2 core/array/values_at_spec.rb
  118. +2 −2 core/array/zip_spec.rb
  119. +2 −2 core/basicobject/instance_exec_spec.rb
  120. +1 −1  core/basicobject/method_missing_spec.rb
  121. +1 −1  core/basicobject/remove_method_missing.rb
  122. +2 −2 core/basicobject/singleton_method_added_spec.rb
  123. +2 −2 core/basicobject/singleton_method_removed_spec.rb
  124. +1 −1  core/basicobject/singleton_method_undefined_spec.rb
  125. +1 −1  core/bignum/abs_spec.rb
  126. +1 −1  core/bignum/bit_and_spec.rb
  127. +1 −1  core/bignum/bit_or_spec.rb
  128. +1 −1  core/bignum/bit_xor_spec.rb
  129. +1 −1  core/bignum/coerce_spec.rb
  130. +1 −1  core/bignum/comparison_spec.rb
  131. +1 −1  core/bignum/complement_spec.rb
  132. +2 −2 core/bignum/div_spec.rb
  133. +2 −2 core/bignum/divide_spec.rb
  134. +1 −1  core/bignum/divmod_spec.rb
  135. +1 −1  core/bignum/element_reference_spec.rb
  136. +1 −1  core/bignum/eql_spec.rb
  137. +1 −1  core/bignum/equal_value_spec.rb
  138. +1 −1  core/bignum/even_spec.rb
  139. +1 −1  core/bignum/exponent_spec.rb
  140. +1 −1  core/bignum/gt_spec.rb
  141. +1 −1  core/bignum/gte_spec.rb
  142. +1 −1  core/bignum/hash_spec.rb
  143. +1 −1  core/bignum/left_shift_spec.rb
  144. +1 −1  core/bignum/lt_spec.rb
  145. +1 −1  core/bignum/lte_spec.rb
  146. +1 −1  core/bignum/minus_spec.rb
  147. +2 −2 core/bignum/modulo_spec.rb
  148. +1 −1  core/bignum/multiply_spec.rb
  149. +1 −1  core/bignum/odd_spec.rb
  150. +1 −1  core/bignum/plus_spec.rb
  151. +1 −1  core/bignum/quo_spec.rb
  152. +1 −1  core/bignum/remainder_spec.rb
  153. +1 −1  core/bignum/right_shift_spec.rb
  154. +1 −1  core/bignum/size_spec.rb
  155. +1 −1  core/bignum/to_f_spec.rb
  156. +1 −1  core/bignum/to_s_spec.rb
  157. +1 −1  core/bignum/uminus_spec.rb
  158. +3 −3 core/binding/clone_spec.rb
  159. +3 −3 core/binding/dup_spec.rb
  160. +2 −2 core/binding/eval_spec.rb
  161. +1 −1  core/builtin_constants/builtin_constants_spec.rb
  162. +1 −1  core/class/allocate_spec.rb
  163. +2 −2 core/class/inherited_spec.rb
  164. +1 −1  core/class/initialize_copy_spec.rb
  165. +1 −1  core/class/initialize_spec.rb
  166. +1 −1  core/class/new_spec.rb
  167. +2 −2 core/class/superclass_spec.rb
  168. +2 −2 core/comparable/between_spec.rb
  169. +2 −2 core/comparable/equal_value_spec.rb
  170. +2 −2 core/comparable/gt_spec.rb
  171. +2 −2 core/comparable/gte_spec.rb
  172. +2 −2 core/comparable/lt_spec.rb
  173. +2 −2 core/comparable/lte_spec.rb
  174. +2 −2 core/complex/Complex_spec.rb
  175. +1 −1  core/complex/abs2_spec.rb
  176. +1 −1  core/complex/abs_spec.rb
  177. +2 −2 core/complex/angle_spec.rb
  178. +2 −2 core/complex/arg_spec.rb
  179. +1 −1  core/complex/coerce_spec.rb
  180. +2 −2 core/complex/conj_spec.rb
  181. +2 −2 core/complex/conjugate_spec.rb
  182. +1 −1  core/complex/denominator_spec.rb
  183. +1 −1  core/complex/divide_spec.rb
  184. +1 −1  core/complex/equal_value_spec.rb
  185. +1 −1  core/complex/exponent_spec.rb
  186. +1 −1  core/complex/fdiv_spec.rb
  187. +2 −2 core/complex/hash_spec.rb
  188. +1 −1  core/complex/imag_spec.rb
  189. +1 −1  core/complex/inspect_spec.rb
  190. +1 −1  core/complex/minus_spec.rb
  191. +1 −1  core/complex/multiply_spec.rb
  192. +1 −1  core/complex/numerator_spec.rb
  193. +1 −1  core/complex/plus_spec.rb
  194. +1 −1  core/complex/polar_spec.rb
  195. +1 −1  core/complex/real_spec.rb
  196. +1 −1  core/complex/rect_spec.rb
  197. +2 −2 core/complex/rectangular_spec.rb
  198. +1 −1  core/complex/to_s_spec.rb
  199. +2 −2 core/continuation/call_spec.rb
  200. +2 −2 core/continuation/element_reference_spec.rb
  201. +2 −2 core/continuation/new_spec.rb
  202. +2 −2 core/dir/chdir_spec.rb
  203. +2 −2 core/dir/chroot_spec.rb
  204. +3 −3 core/dir/close_spec.rb
  205. +3 −3 core/dir/delete_spec.rb
  206. +1 −1  core/dir/dir_spec.rb
  207. +3 −3 core/dir/each_spec.rb
  208. +3 −3 core/dir/element_reference_spec.rb
  209. +2 −2 core/dir/entries_spec.rb
  210. +3 −3 core/dir/exist_spec.rb
  211. +3 −3 core/dir/exists_spec.rb
  212. +2 −2 core/dir/foreach_spec.rb
  213. +3 −3 core/dir/getwd_spec.rb
  214. +3 −3 core/dir/glob_spec.rb
  215. +2 −2 core/dir/home_spec.rb
  216. +2 −2 core/dir/inspect_spec.rb
  217. +2 −2 core/dir/mkdir_spec.rb
  218. +2 −2 core/dir/new_spec.rb
  219. +3 −3 core/dir/open_spec.rb
  220. +3 −3 core/dir/path_spec.rb
  221. +4 −4 core/dir/pos_spec.rb
  222. +3 −3 core/dir/pwd_spec.rb
  223. +3 −3 core/dir/read_spec.rb
  224. +3 −3 core/dir/rewind_spec.rb
  225. +3 −3 core/dir/rmdir_spec.rb
  226. +3 −3 core/dir/seek_spec.rb
  227. +3 −3 core/dir/shared/path.rb
  228. +4 −4 core/dir/tell_spec.rb
  229. +3 −3 core/dir/to_path.rb
  230. +3 −3 core/dir/unlink_spec.rb
  231. +1 −1  core/encoding/aliases_spec.rb
  232. +1 −1  core/encoding/ascii_compatible_spec.rb
  233. +1 −1  core/encoding/compatible_spec.rb
  234. +1 −1  core/encoding/converter/asciicompat_encoding_spec.rb
  235. +1 −1  core/encoding/converter/constants_spec.rb
  236. +1 −1  core/encoding/converter/convert_spec.rb
  237. +1 −1  core/encoding/converter/convpath_spec.rb
  238. +1 −1  core/encoding/converter/destination_encoding_spec.rb
  239. +1 −1  core/encoding/converter/finish_spec.rb
  240. +1 −1  core/encoding/converter/last_error_spec.rb
  241. +1 −1  core/encoding/converter/primitive_convert_spec.rb
  242. +1 −1  core/encoding/converter/primitive_errinfo_spec.rb
  243. +1 −1  core/encoding/converter/putback_spec.rb
  244. +1 −1  core/encoding/converter/replacement_spec.rb
  245. +1 −1  core/encoding/converter/search_convpath_spec.rb
  246. +1 −1  core/encoding/converter/source_encoding_spec.rb
  247. +1 −1  core/encoding/default_external_spec.rb
  248. +1 −1  core/encoding/default_internal_spec.rb
  249. +1 −1  core/encoding/dummy_spec.rb
  250. +1 −1  core/encoding/find_spec.rb
  251. +1 −1  core/encoding/inspect_spec.rb
  252. +1 −1  core/encoding/invalid_byte_sequence_error/destination_encoding_name_spec.rb
  253. +1 −1  core/encoding/invalid_byte_sequence_error/destination_encoding_spec.rb
  254. +1 −1  core/encoding/invalid_byte_sequence_error/error_bytes_spec.rb
  255. +1 −1  core/encoding/invalid_byte_sequence_error/incomplete_input_spec.rb
  256. +1 −1  core/encoding/invalid_byte_sequence_error/readagain_bytes_spec.rb
  257. +1 −1  core/encoding/invalid_byte_sequence_error/source_encoding_name_spec.rb
  258. +1 −1  core/encoding/invalid_byte_sequence_error/source_encoding_spec.rb
  259. +1 −1  core/encoding/list_spec.rb
  260. +1 −1  core/encoding/locale_charmap_spec.rb
  261. +1 −1  core/encoding/name_list_spec.rb
  262. +1 −1  core/encoding/name_spec.rb
  263. +1 −1  core/encoding/names_spec.rb
  264. +1 −1  core/encoding/replicate_spec.rb
  265. +1 −1  core/encoding/shared/name.rb
  266. +1 −1  core/encoding/to_s_spec.rb
  267. +1 −1  core/encoding/undefined_conversion_error/destination_encoding_name_spec.rb
  268. +1 −1  core/encoding/undefined_conversion_error/destination_encoding_spec.rb
  269. +1 −1  core/encoding/undefined_conversion_error/error_char_spec.rb
  270. +1 −1  core/encoding/undefined_conversion_error/source_encoding_name_spec.rb
  271. +1 −1  core/encoding/undefined_conversion_error/source_encoding_spec.rb
  272. +2 −2 core/enumerable/all_spec.rb
  273. +2 −2 core/enumerable/any_spec.rb
  274. +2 −2 core/enumerable/chunk_spec.rb
  275. +3 −3 core/enumerable/collect_concat_spec.rb
  276. +3 −3 core/enumerable/collect_spec.rb
  277. +2 −2 core/enumerable/count_spec.rb
  278. +2 −2 core/enumerable/cycle_spec.rb
  279. +3 −3 core/enumerable/detect_spec.rb
  280. +2 −2 core/enumerable/drop_spec.rb
  281. +2 −2 core/enumerable/drop_while_spec.rb
  282. +2 −2 core/enumerable/each_cons_spec.rb
  283. +2 −2 core/enumerable/each_slice_spec.rb
  284. +2 −2 core/enumerable/each_with_index_spec.rb
  285. +2 −2 core/enumerable/each_with_object_spec.rb
  286. +3 −3 core/enumerable/entries_spec.rb
  287. +3 −3 core/enumerable/find_all_spec.rb
  288. +2 −2 core/enumerable/find_index_spec.rb
  289. +3 −3 core/enumerable/find_spec.rb
  290. +3 −3 core/enumerable/first_spec.rb
  291. +3 −3 core/enumerable/flat_map_spec.rb
  292. +2 −2 core/enumerable/grep_spec.rb
  293. +2 −2 core/enumerable/group_by_spec.rb
  294. +3 −3 core/enumerable/include_spec.rb
  295. +3 −3 core/enumerable/inject_spec.rb
  296. +2 −2 core/enumerable/join_spec.rb
  297. +3 −3 core/enumerable/map_spec.rb
  298. +2 −2 core/enumerable/max_by_spec.rb
  299. +2 −2 core/enumerable/max_spec.rb
  300. +3 −3 core/enumerable/member_spec.rb
Sorry, we could not display the entire diff because too many files (3,025) changed.
View
2  command_line/dash_d_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe "The -d command line option" do
it "sets $DEBUG to true" do
View
2  command_line/dash_e_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe "The -e command line option" do
it "evaluates the given string" do
View
2  command_line/dash_r_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe "The -r command line option" do
it "requires the specified file" do
View
2  command_line/dash_upper_i_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../spec_helper'
+require File.expand_path('../../spec_helper', __FILE__)
describe "The -I command line option" do
it "adds the path to the load path ($:)" do
View
4 command_line/dash_upper_w_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../spec_helper'
-require File.dirname(__FILE__) + '/shared/verbose'
+require File.expand_path('../../spec_helper', __FILE__)
+require File.expand_path('../shared/verbose', __FILE__)
describe "The -W command line option" do
it "with 0 sets $VERBOSE to nil" do
View
4 command_line/dash_v_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../spec_helper'
-require File.dirname(__FILE__) + '/shared/verbose'
+require File.expand_path('../../spec_helper', __FILE__)
+require File.expand_path('../shared/verbose', __FILE__)
describe "The -v command line option" do
it_behaves_like "sets $VERBOSE to true", "-v"
View
4 command_line/dash_w_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../spec_helper'
-require File.dirname(__FILE__) + '/shared/verbose'
+require File.expand_path('../../spec_helper', __FILE__)
+require File.expand_path('../shared/verbose', __FILE__)
describe "The -w command line option" do
it_behaves_like "sets $VERBOSE to true", "-w"
View
2  core/argf/argf_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF" do
it "is extended by the Enumerable module" do
View
2  core/argf/binmode_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.binmode" do
before :each do
View
4 core/argf/bytes_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/each_byte'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/each_byte', __FILE__)
ruby_version_is "1.8.7" do
describe "ARGF.bytes" do
View
4 core/argf/chars_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/each_char'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/each_char', __FILE__)
ruby_version_is "1.8.7" do
describe "ARGF.chars" do
View
2  core/argf/close_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.close" do
before :each do
View
2  core/argf/closed_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.closed?" do
before :each do
View
4 core/argf/each_byte_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/each_byte'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/each_byte', __FILE__)
describe "ARGF.each_byte" do
it_behaves_like :argf_each_byte, :each_byte
View
4 core/argf/each_char_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/each_char'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/each_char', __FILE__)
ruby_version_is "1.8.7" do
describe "ARGF.each_char" do
View
4 core/argf/each_line_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/each_line'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/each_line', __FILE__)
describe "ARGF.each_line" do
it_behaves_like :argf_each_line, :each_line
View
4 core/argf/each_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/each_line'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/each_line', __FILE__)
describe "ARGF.each" do
it_behaves_like :argf_each_line, :each
View
4 core/argf/eof_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/eof'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/eof', __FILE__)
describe "ARGF.eof" do
it_behaves_like :argf_eof, :eof
View
2  core/argf/file_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.file" do
before :each do
View
4 core/argf/filename_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/filename'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/filename', __FILE__)
describe "ARGF.filename" do
it_behaves_like :argf_filename, :filename
View
4 core/argf/fileno_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/fileno'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/fileno', __FILE__)
describe "ARGF.fileno" do
it_behaves_like :argf_fileno, :fileno
View
4 core/argf/getc_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/getc'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/getc', __FILE__)
describe "ARGF.getc" do
it_behaves_like :argf_getc, :getc
View
4 core/argf/gets_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/gets'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/gets', __FILE__)
describe "ARGF.gets" do
it_behaves_like :argf_gets, :gets
View
2  core/argf/lineno_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.lineno" do
before :each do
View
4 core/argf/path_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/filename'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/filename', __FILE__)
describe "ARGF.path" do
it_behaves_like :argf_filename, :path
View
4 core/argf/pos_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/pos'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/pos', __FILE__)
describe "ARGF.pos" do
it_behaves_like :argf_pos, :pos
View
2  core/argf/read_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.read" do
before :each do
View
4 core/argf/readchar_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/getc'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/getc', __FILE__)
describe "ARGF.getc" do
it_behaves_like :argf_getc, :readchar
View
4 core/argf/readline_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/gets'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/gets', __FILE__)
describe "ARGF.readline" do
it_behaves_like :argf_gets, :readline
View
4 core/argf/readlines_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/readlines'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/readlines', __FILE__)
describe "ARGF.readlines" do
it_behaves_like :argf_readlines, :readlines
View
2  core/argf/rewind_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.rewind" do
before :each do
View
2  core/argf/seek_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.seek" do
before :each do
View
2  core/argf/skip_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.skip" do
before :each do
View
4 core/argf/tell_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/pos'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/pos', __FILE__)
describe "ARGF.tell" do
it_behaves_like :argf_pos, :tell
View
4 core/argf/to_a_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/readlines'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/readlines', __FILE__)
describe "ARGF.to_a" do
it_behaves_like :argf_readlines, :to_a
View
4 core/argf/to_i_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/fileno'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/fileno', __FILE__)
describe "ARGF.to_i" do
it_behaves_like :argf_fileno, :to_i
View
2  core/argf/to_io_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.to_io" do
before :each do
View
2  core/argf/to_s_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "ARGF.to_s" do
before :each do
View
2  core/array/allocate_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Array.allocate" do
it "returns an instance of Array" do
View
4 core/array/append_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#<<" do
it "pushes the object onto the end of the array" do
View
2  core/array/array_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Array" do
it "includes Enumerable" do
View
4 core/array/assoc_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#assoc" do
it "returns the first array whose 1st item is == obj or nil" do
View
4 core/array/at_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#at" do
it "returns the (n+1)'th element for the passed index n" do
View
4 core/array/choice_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#choice" do
ruby_version_is "" ... "1.8.7" do
View
4 core/array/clear_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#clear" do
it "removes all elements" do
View
6 core/array/clone_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/clone'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/clone', __FILE__)
describe "Array#clone" do
it_behaves_like :array_clone, :clone
View
6 core/array/collect_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/collect'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/collect', __FILE__)
describe "Array#collect" do
it_behaves_like(:array_collect, :collect)
View
2  core/array/combination_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Array#combination" do
ruby_version_is "1.8.7" do
View
4 core/array/compact_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#compact" do
it "returns a copy of array with all nil elements removed" do
View
4 core/array/comparison_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#<=>" do
it "calls <=> left to right and return first non-0 result" do
View
4 core/array/concat_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#concat" do
it "returns the array itself" do
View
4 core/array/constructor_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array.[]" do
it "returns a new array populated with the given elements" do
View
4 core/array/delete_at_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#delete_at" do
it "removes the element at the specified index" do
View
6 core/array/delete_if_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/enumeratorize'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/enumeratorize', __FILE__)
describe "Array#delete_if" do
before do
View
4 core/array/delete_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#delete" do
it "removes elements that are #== to object" do
View
6 core/array/dup_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/clone'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/clone', __FILE__)
describe "Array#dup" do
it_behaves_like :array_clone, :dup # FIX: no, clone and dup are not alike
View
6 core/array/each_index_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/enumeratorize'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/enumeratorize', __FILE__)
# Modifying a collection while the contents are being iterated
# gives undefined behavior. See
View
6 core/array/each_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/enumeratorize'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/enumeratorize', __FILE__)
# Modifying a collection while the contents are being iterated
# gives undefined behavior. See
View
6 core/array/element_reference_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/slice'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/slice', __FILE__)
describe "Array#[]" do
it_behaves_like(:array_slice, :[])
View
4 core/array/element_set_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#[]=" do
it "sets the value of the element at index" do
View
4 core/array/empty_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#empty?" do
it "returns true if the array has no elements" do
View
6 core/array/eql_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/eql'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/eql', __FILE__)
# Do not use #should_receive(:eql?) mocks in these specs
# because MSpec uses Hash for mocks and Hash calls #eql?.
View
6 core/array/equal_value_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/eql'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/eql', __FILE__)
describe "Array#==" do
it_behaves_like :array_eql, :==
View
4 core/array/fetch_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#fetch" do
it "returns the element at the passed index" do
View
4 core/array/fill_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#fill" do
before(:all) do
View
4 core/array/first_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#first" do
it "returns the first element" do
View
4 core/array/flatten_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#flatten" do
it "returns a one-dimensional flattening recursively" do
View
4 core/array/frozen_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#frozen?" do
it "returns true if array is frozen" do
View
4 core/array/hash_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#hash" do
it "returns the same fixnum for arrays with the same content" do
View
4 core/array/include_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#include?" do
it "returns true if object is present, false otherwise" do
View
2  core/array/index_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Array#index" do
it "returns the index of the first element == to object" do
View
6 core/array/indexes_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/indexes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/indexes', __FILE__)
ruby_version_is '' ... '1.9' do
describe "Array#indexes" do
View
6 core/array/indices_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/indexes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/indexes', __FILE__)
ruby_version_is '' ... '1.9' do
describe "Array#indices" do
View
6 core/array/initialize_copy_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/replace'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/replace', __FILE__)
describe "Array#initialize_copy" do
it "is private" do
View
4 core/array/initialize_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#initialize" do
before :each do
View
4 core/array/insert_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#insert" do
it "returns self" do
View
4 core/array/inspect_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#inspect" do
it "returns a string" do
View
4 core/array/intersection_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#&" do
it "creates an array with elements common to both arrays (intersection)" do
View
4 core/array/join_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
require File.dirname(__FILE__) + '/../../shared/array/join'
describe "Array#join" do
View
4 core/array/last_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#last" do
it "returns the last element" do
View
6 core/array/length_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/length'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/length', __FILE__)
describe "Array#length" do
it_behaves_like(:array_length, :length)
View
6 core/array/map_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/collect'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/collect', __FILE__)
describe "Array#map" do
it_behaves_like(:array_collect, :map)
View
4 core/array/minus_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#-" do
it "creates an array minus any items from other array" do
View
4 core/array/multiply_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
require File.dirname(__FILE__) + '/../../shared/array/join'
describe "Array#*" do
View
4 core/array/new_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array.new" do
it "returns an instance of Array" do
View
4 core/array/nitems_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
# Array#nitems was removed from Ruby 1.9.
ruby_version_is '' ... '1.9' do
View
4 core/array/pack_spec.rb
@@ -3,8 +3,8 @@
# Script encoding of this file should be neither ASCII-8BIT, US-ASCII nor UTF-8.
# This makes it easier to verify that Strings are converted into correct encodings.
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
# general behavior
View
4 core/array/partition_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#partition" do
it "returns two arrays" do
View
4 core/array/permutation_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
ruby_version_is "1.8.7" do
View
4 core/array/plus_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#+" do
it "concatenates two arrays" do
View
4 core/array/pop_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#pop" do
it "removes and returns the last element of the array" do
View
4 core/array/product_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#product" do
ruby_version_is "1.8.7" do
View
4 core/array/push_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#push" do
it "appends the arguments to the array" do
View
4 core/array/rassoc_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#rassoc" do
it "returns the first contained array whose second element is == object" do
View
6 core/array/reject_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/enumeratorize'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/enumeratorize', __FILE__)
describe "Array#reject" do
it "returns a new array without elements for which block is true" do
View
6 core/array/replace_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/replace'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/replace', __FILE__)
describe "Array#replace" do
it_behaves_like(:array_replace, :replace)
View
6 core/array/reverse_each_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/enumeratorize'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/enumeratorize', __FILE__)
# Modifying a collection while the contents are being iterated
# gives undefined behavior. See
View
4 core/array/reverse_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#reverse" do
it "returns a new array with the elements in reverse order" do
View
4 core/array/rindex_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
# Modifying a collection while the contents are being iterated
# gives undefined behavior. See
View
4 core/array/rotate_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
ruby_version_is "1.9" do
describe "Array#rotate" do
View
4 core/array/sample_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#sample" do
ruby_version_is "1.8.8" do
View
6 core/array/select_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/enumeratorize'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/enumeratorize', __FILE__)
describe "Array#select" do
it_behaves_like :enumeratorize, :select
View
4 core/array/shift_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#shift" do
it "removes and returns the first element" do
View
4 core/array/shuffle_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#shuffle" do
ruby_version_is "1.8.7" do
View
6 core/array/size_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/length'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/length', __FILE__)
describe "Array#size" do
it_behaves_like(:array_length, :size)
View
6 core/array/slice_spec.rb
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
-require File.dirname(__FILE__) + '/shared/slice'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
+require File.expand_path('../shared/slice', __FILE__)
describe "Array#slice!" do
it "removes and return the element at index" do
View
4 core/array/sort_by_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
ruby_version_is "1.9" do
View
4 core/array/sort_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#sort" do
it "returns a new array sorted based on comparing elements with <=>" do
View
4 core/array/to_a_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#to_a" do
it "returns self" do
View
4 core/array/to_ary_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#to_ary" do
it "returns self" do
View
4 core/array/to_s_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#to_s" do
ruby_version_is "" .. "1.9" do
View
4 core/array/transpose_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#transpose" do
it "assumes an array of arrays and returns the result of transposing rows and columns" do
View
4 core/array/try_convert_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array.try_convert" do
ruby_version_is "1.8.8" do
View
4 core/array/union_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#|" do
it "returns an array of elements that appear in either array (union)" do
View
4 core/array/uniq_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#uniq" do
it "returns an array with no duplicates" do
View
4 core/array/unshift_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#unshift" do
it "prepends object to the original array" do
View
4 core/array/values_at_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#values_at" do
it "returns an array of elements at the indexes when passed indexes" do
View
4 core/array/zip_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/fixtures/classes'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../fixtures/classes', __FILE__)
describe "Array#zip" do
it "returns an array of arrays containing corresponding elements of each array" do
View
4 core/basicobject/instance_exec_spec.rb
@@ -1,8 +1,8 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
ruby_version_is "1.9" do
- require File.dirname(__FILE__) + '/fixtures/classes'
+ require File.expand_path('../fixtures/classes', __FILE__)
describe "BasicObject#instance_exec" do
it "raises a LocalJumpError unless given a block" do
View
2  core/basicobject/method_missing_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../shared/kernel/method_missing'
+require File.expand_path('../../../shared/kernel/method_missing', __FILE__)
ruby_version_is "1.9" do
describe "BasicObject#method_missing" do
View
2  core/basicobject/remove_method_missing.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
ruby_version_is "1.9".."1.9.9" do
View
4 core/basicobject/singleton_method_added_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/../../shared/kernel/singleton_method_added'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../../../shared/kernel/singleton_method_added', __FILE__)
ruby_version_is "1.9" do
describe "BasicObject#singleton_method_added" do
View
4 core/basicobject/singleton_method_removed_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/../../shared/kernel/singleton_method_removed'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../../../shared/kernel/singleton_method_removed', __FILE__)
ruby_version_is "1.9" do
describe "BasicObject#singleton_method_removed" do
View
2  core/basicobject/singleton_method_undefined_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../shared/kernel/singleton_method_undefined'
+require File.expand_path('../../../shared/kernel/singleton_method_undefined', __FILE__)
ruby_version_is "1.9" do
describe "BasicObject#singleton_method_undefined" do
View
2  core/bignum/abs_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#abs" do
it "returns the absolute value" do
View
2  core/bignum/bit_and_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#&" do
before(:each) do
View
2  core/bignum/bit_or_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#|" do
before(:each) do
View
2  core/bignum/bit_xor_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#^" do
before(:each) do
View
2  core/bignum/coerce_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#coerce" do
it "coerces other to a Bignum and returns [other, self] when passed a Fixnum" do
View
2  core/bignum/comparison_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#<=>" do
before(:each) do
View
2  core/bignum/complement_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#~" do
it "returns self with each bit flipped" do
View
4 core/bignum/div_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/divide'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/divide', __FILE__)
describe "Bignum#div" do
it_behaves_like(:bignum_divide, :div)
View
4 core/bignum/divide_spec.rb
@@ -1,5 +1,5 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
-require File.dirname(__FILE__) + '/shared/divide'
+require File.expand_path('../../../spec_helper', __FILE__)
+require File.expand_path('../shared/divide', __FILE__)
describe "Bignum#/" do
it_behaves_like(:bignum_divide, :/)
View
2  core/bignum/divmod_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#divmod" do
before(:each) do
View
2  core/bignum/element_reference_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#[]" do
before(:each) do
View
2  core/bignum/eql_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#eql? when given a Bignum" do
it "returns true if the given argument has the same value" do
View
2  core/bignum/equal_value_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#==" do
before(:each) do
View
2  core/bignum/even_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
ruby_version_is "1.8.7" do
describe "Bignum#even?" do
View
2  core/bignum/exponent_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#**" do
before(:each) do
View
2  core/bignum/gt_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)
describe "Bignum#>" do
before(:each) do
View
2  core/bignum/gte_spec.rb
@@ -1,4 +1,4 @@
-require File.dirname(__FILE__) + '/../../spec_helper'
+require File.expand_path('../../../spec_helper', __FILE__)