glib2 0.90.5 → 0.90.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. data/ChangeLog +79 -0
  2. data/Rakefile +8 -65
  3. data/ext/glib2/Makefile +169 -0
  4. data/ext/glib2/glib-enum-types.c +1065 -0
  5. data/ext/glib2/glib-enum-types.h +144 -0
  6. data/ext/glib2/glib-enum-types.o +0 -0
  7. data/ext/glib2/glib2.so +0 -0
  8. data/ext/glib2/rbglib.h +1 -1
  9. data/ext/glib2/rbglib.o +0 -0
  10. data/ext/glib2/rbglib_bookmarkfile.o +0 -0
  11. data/ext/glib2/rbglib_completion.o +0 -0
  12. data/ext/glib2/rbglib_convert.o +0 -0
  13. data/ext/glib2/rbglib_error.o +0 -0
  14. data/ext/glib2/rbglib_fileutils.o +0 -0
  15. data/ext/glib2/rbglib_i18n.o +0 -0
  16. data/ext/glib2/rbglib_int64.o +0 -0
  17. data/ext/glib2/rbglib_iochannel.o +0 -0
  18. data/ext/glib2/rbglib_keyfile.o +0 -0
  19. data/ext/glib2/rbglib_maincontext.o +0 -0
  20. data/ext/glib2/rbglib_mainloop.o +0 -0
  21. data/ext/glib2/rbglib_messages.o +0 -0
  22. data/ext/glib2/rbglib_pollfd.o +0 -0
  23. data/ext/glib2/rbglib_shell.o +0 -0
  24. data/ext/glib2/rbglib_source.o +0 -0
  25. data/ext/glib2/rbglib_spawn.o +0 -0
  26. data/ext/glib2/rbglib_threads.o +0 -0
  27. data/ext/glib2/rbglib_timer.o +0 -0
  28. data/ext/glib2/rbglib_unicode.o +0 -0
  29. data/ext/glib2/rbglib_utils.o +0 -0
  30. data/ext/glib2/rbglib_win32.o +0 -0
  31. data/ext/glib2/rbgobj_boxed.o +0 -0
  32. data/ext/glib2/rbgobj_closure.o +0 -0
  33. data/ext/glib2/rbgobj_convert.o +0 -0
  34. data/ext/glib2/rbgobj_enums.o +0 -0
  35. data/ext/glib2/rbgobj_fundamental.o +0 -0
  36. data/ext/glib2/rbgobj_object.o +0 -0
  37. data/ext/glib2/rbgobj_param.o +0 -0
  38. data/ext/glib2/rbgobj_paramspecs.o +0 -0
  39. data/ext/glib2/rbgobj_signal.o +0 -0
  40. data/ext/glib2/rbgobj_strv.o +0 -0
  41. data/ext/glib2/rbgobj_type.c +1 -1
  42. data/ext/glib2/rbgobj_type.o +0 -0
  43. data/ext/glib2/rbgobj_typeinstance.o +0 -0
  44. data/ext/glib2/rbgobj_typeinterface.o +0 -0
  45. data/ext/glib2/rbgobj_typemodule.o +0 -0
  46. data/ext/glib2/rbgobj_typeplugin.o +0 -0
  47. data/ext/glib2/rbgobj_value.o +0 -0
  48. data/ext/glib2/rbgobj_valuearray.o +0 -0
  49. data/ext/glib2/rbgobj_valuetypes.o +0 -0
  50. data/ext/glib2/rbgobject.o +0 -0
  51. data/ext/glib2/rbgutil.o +0 -0
  52. data/ext/glib2/rbgutil_callback.o +0 -0
  53. data/ext/glib2/ruby-glib2.pc +3 -0
  54. data/lib/glib2.rb +2 -2
  55. data/lib/gnome2-raketask.rb +185 -0
  56. data/lib/gnome2-win32-binary-downloader.rb +49 -9
  57. data/lib/mkmf-gnome2.rb +55 -43
  58. data/test-unit/History.txt +5 -0
  59. data/test-unit/html/index.html +2 -2
  60. data/test-unit/html/index.html.ja +2 -2
  61. data/test-unit/lib/test/unit/assertions.rb +9 -4
  62. data/test-unit/lib/test/unit/autorunner.rb +13 -1
  63. data/test-unit/lib/test/unit/testsuite.rb +4 -2
  64. data/test-unit/lib/test/unit/version.rb +1 -1
  65. data/test-unit/test/test-testcase.rb +11 -3
  66. data/test-unit/test/test_assertions.rb +24 -3
  67. metadata +205 -153
@@ -23,11 +23,13 @@ class GNOME2Win32BinaryDownloader
23
23
 
24
24
  URL_BASE = "http://ftp.gnome.org/pub/gnome/binaries/win32"
25
25
  def initialize(options={})
26
- @output_dir = options[:output_dir] || File.join("vendor", "local")
26
+ output_dir = options[:output_dir] || File.join("vendor", "local")
27
+ @output_dir = File.expand_path(output_dir)
27
28
  end
28
29
 
29
30
  def download_package(package)
30
- version_page = agent.get("#{URL_BASE}/#{package}")
31
+ version_page_url = "#{URL_BASE}/#{package}"
32
+ version_page = agent.get(version_page_url)
31
33
  latest_version_link = version_page.links.sort_by do |link|
32
34
  if /\A(\d+\.\d+)\/\z/ =~ link.href
33
35
  $1.split(/\./).collect {|component| component.to_i}
@@ -36,11 +38,18 @@ class GNOME2Win32BinaryDownloader
36
38
  end
37
39
  end.last
38
40
 
41
+ escaped_package = Regexp.escape(package)
39
42
  latest_version_page = latest_version_link.click
40
43
  latest_version = latest_version_page.links.collect do |link|
41
- if /_([\d\.\-]+)_win32\.zip\z/ =~ link.href
44
+ case link.href
45
+ when /#{escaped_package}_([\d\.\-]+)_win32\.zip\z/,
46
+ /#{escaped_package}-([\d\.\-]+)-win32\.zip\z/, # old
47
+ /#{escaped_package}-([\d\.\-]+)\.zip\z/ # old
42
48
  version = $1
43
- [version.split(/[\.\-]/).collect {|component| component.to_i}, version]
49
+ normalized_version = version.split(/[\.\-]/).collect do |component|
50
+ component.to_i
51
+ end
52
+ [normalized_version, version]
44
53
  else
45
54
  [[-1], nil]
46
55
  end
@@ -48,17 +57,33 @@ class GNOME2Win32BinaryDownloader
48
57
  normalized_version
49
58
  end.last[1]
50
59
 
60
+ if latest_version.nil?
61
+ raise "can't find package: <#{package}>:<#{version_page_url}>"
62
+ end
63
+ escaped_latest_version = Regexp.escape(latest_version)
51
64
  latest_version_page.links.each do |link|
52
- if /_#{Regexp.escape(latest_version)}_win32\.zip\z/ =~ link.href
65
+ case link.href
66
+ when /#{escaped_package}(?:-dev)?_#{escaped_latest_version}_win32\.zip\z/,
67
+ /#{escaped_package}(?:-dev)?-#{escaped_latest_version}-win32\.zip\z/, # old
68
+ /#{escaped_package}(?:-dev)?-#{escaped_latest_version}\.zip\z/ # old
53
69
  click_zip_link(link)
54
70
  end
55
71
  end
56
72
  end
57
73
 
58
74
  def download_dependency(dependency)
59
- dependencies_page = agent.get("#{URL_BASE}/dependencies")
75
+ dependency_version = "any"
76
+ dependency_version_re = /[\d\.\-]+/
77
+ if dependency.is_a?(Array)
78
+ dependency, dependency_version = dependency
79
+ dependency_version_re = /#{Regexp.escape(dependency_version)}/
80
+ end
81
+ escaped_dependency = Regexp.escape(dependency)
82
+ dependencies_url = "#{URL_BASE}/dependencies"
83
+ dependencies_page = agent.get(dependencies_url)
60
84
  latest_version = dependencies_page.links.collect do |link|
61
- if /\A#{Regexp.escape(dependency)}_([\d\.\-]+)_win32\.zip\z/ =~ link.href
85
+ case link.href
86
+ when /\A#{escaped_dependency}_(#{dependency_version_re})_win32\.zip\z/
62
87
  version = $1
63
88
  [version.split(/[\.\-]/).collect {|component| component.to_i}, version]
64
89
  else
@@ -67,8 +92,16 @@ class GNOME2Win32BinaryDownloader
67
92
  end.sort_by do |normalized_version, version|
68
93
  normalized_version
69
94
  end.last[1]
95
+
96
+ if latest_version.nil?
97
+ message = "can't find dependency package: " +
98
+ "<#{dependency}>(#{dependency_version}):<#{dependencies_url}>"
99
+ raise message
100
+ end
101
+ escaped_latest_version = Regexp.escape(latest_version)
70
102
  dependencies_page.links.each do |link|
71
- if /\A#{Regexp.escape(dependency)}(?:-dev)?_#{Regexp.escape(latest_version)}_win32.zip/ =~ link.href
103
+ case link.href
104
+ when /\A#{escaped_dependency}(?:-dev)?_#{escaped_latest_version}_win32.zip/
72
105
  click_zip_link(link)
73
106
  end
74
107
  end
@@ -86,7 +119,14 @@ class GNOME2Win32BinaryDownloader
86
119
  open(zip.filename, "wb") do |file|
87
120
  file.print(zip.body)
88
121
  end
89
- system("unzip '#{zip.filename}'")
122
+ system("unzip", "-o", zip.filename)
123
+ Dir.glob("lib/pkgconfig/*.pc") do |pc_path|
124
+ pc = File.read(pc_path)
125
+ pc = pc.gsub(/\Aprefix=.+$/) {"prefix=#{@output_dir}"}
126
+ File.open(pc_path, "w") do |pc_file|
127
+ pc_file.print(pc)
128
+ end
129
+ end
90
130
  end
91
131
  end
92
132
  end
@@ -9,6 +9,7 @@
9
9
  # license of Ruby-GNOME2.
10
10
  #
11
11
 
12
+ require 'English'
12
13
  require 'mkmf'
13
14
  begin
14
15
  require 'pkg-config'
@@ -58,10 +59,11 @@ def setup_win32(target_name, base_dir=nil)
58
59
  base_dir ||= Pathname($0).dirname.parent.parent.expand_path
59
60
  base_dir = Pathname(base_dir) if base_dir.is_a?(String)
60
61
  binary_base_dir = base_dir + "vendor" + "local"
61
- $CFLAGS += " -I#{binary_base_dir}/include"
62
- pkg_config_dir = binary_base_dir + "lib" + "pkgconfig"
63
- PKGConfig.add_path(pkg_config_dir.to_s)
64
- PKGConfig.set_override_variable("prefix", binary_base_dir.to_s)
62
+ if binary_base_dir.exist?
63
+ $CFLAGS += " -I#{binary_base_dir}/include"
64
+ pkg_config_dir = binary_base_dir + "lib" + "pkgconfig"
65
+ PKGConfig.add_path(pkg_config_dir.to_s)
66
+ end
65
67
  true
66
68
  else
67
69
  false
@@ -69,7 +71,7 @@ def setup_win32(target_name, base_dir=nil)
69
71
  end
70
72
  end
71
73
 
72
- #add_depend_package("glib2", "glib/src", "/...../ruby-gnome2")
74
+ #add_depend_package("glib2", "ext/glib2", "/...../ruby-gnome2")
73
75
  def add_depend_package(target_name, target_srcdir, top_srcdir, options={})
74
76
  [top_srcdir, $configure_args['--topdir']].each do |topdir|
75
77
  topdir = File.expand_path(topdir)
@@ -93,12 +95,23 @@ def add_depend_package(target_name, target_srcdir, top_srcdir, options={})
93
95
  next unless File.exist?(target_build_dir_full_path)
94
96
  $INCFLAGS = "-I#{target_build_dir_full_path} #{$INCFLAGS}"
95
97
 
96
- if /cygwin|mingw/ =~ RUBY_PLATFORM
97
- $libs << " -lruby-#{target_name}"
98
- $LDFLAGS << " -L#{target_build_dir_full_path}"
99
- elsif /mswin32/ =~ RUBY_PLATFORM
100
- $DLDFLAGS << " /libpath:#{target_build_dir_full_path}"
101
- $libs << " libruby-#{target_name}.lib"
98
+ case RUBY_PLATFORM
99
+ when /cygwin|mingw|mswin32/
100
+ case RUBY_PLATFORM
101
+ when /cygwin|mingw/
102
+ $LDFLAGS << " -L#{target_build_dir_full_path}"
103
+ $libs << " -lruby-#{target_name}"
104
+ when /mswin32/
105
+ $DLDFLAGS << " /libpath:#{target_build_dir_full_path}"
106
+ $libs << " libruby-#{target_name}.lib"
107
+ end
108
+ target_base_dir = Pathname.new(target_source_dir_full_path).parent.parent
109
+ target_binary_base_dir = target_base_dir + "vendor" + "local"
110
+ if target_binary_base_dir.exist?
111
+ $INCFLAGS = "-I#{target_binary_base_dir}/include #{$INCFLAGS}"
112
+ target_pkg_config_dir = target_binary_base_dir + "lib" + "pkgconfig"
113
+ PKGConfig.add_path(target_pkg_config_dir.to_s)
114
+ end
102
115
  end
103
116
  end
104
117
  end
@@ -239,8 +252,17 @@ end
239
252
  # This is used for the library which doesn't support version info.
240
253
  def make_version_header(app_name, pkgname, dir = "src")
241
254
  version = PKGConfig.modversion(pkgname).split(/\./)
255
+ version = "2.0b7".split(/\./)
242
256
  (0..2).each do |v|
243
257
  version[v] = "0" unless version[v]
258
+ if /\A(\d+)/ =~ version[v]
259
+ number = $1
260
+ tag = $POSTMATCH
261
+ unless tag.empty?
262
+ version[v] = number
263
+ version[3] = tag
264
+ end
265
+ end
244
266
  end
245
267
  filename = "rb#{app_name.downcase}version.h"
246
268
 
@@ -251,6 +273,12 @@ def make_version_header(app_name, pkgname, dir = "src")
251
273
  FileUtils.mkdir_p(dir)
252
274
  out = File.open(File.join(dir, filename), "w")
253
275
 
276
+ version_definitions = []
277
+ ["MAJOR", "MINOR", "MICRO", "TAG"].each_with_index do |type, i|
278
+ _version = version[i]
279
+ next if _version.nil?
280
+ version_definitions << "#define #{app_name}_#{type}_VERSION (#{_version})"
281
+ end
254
282
  out.print %Q[/* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
255
283
  /************************************************
256
284
 
@@ -263,9 +291,7 @@ def make_version_header(app_name, pkgname, dir = "src")
263
291
  #ifndef __RB#{app_name}_VERSION_H__
264
292
  #define __RB#{app_name}_VERSION_H__
265
293
 
266
- #define #{app_name}_MAJOR_VERSION (#{version[0]})
267
- #define #{app_name}_MINOR_VERSION (#{version[1]})
268
- #define #{app_name}_MICRO_VERSION (#{version[2]})
294
+ #{version_definitions.join("\n")}
269
295
 
270
296
  #define #{app_name}_CHECK_VERSION(major,minor,micro) \\
271
297
  (#{app_name}_MAJOR_VERSION > (major) || \\
@@ -320,48 +346,34 @@ def glib_mkenums(prefix, files, g_type_prefix, include_files, options={})
320
346
  end
321
347
 
322
348
  def check_cairo(options={})
323
- return false unless PKGConfig.have_package('cairo')
324
-
325
349
  rcairo_source_dir = options[:rcairo_source_dir]
326
350
  if rcairo_source_dir and !File.exist?(rcairo_source_dir)
327
351
  rcairo_source_dir = nil
328
352
  end
329
- $CFLAGS += " -I#{rcairo_source_dir}/ext/cairo" if rcairo_source_dir
330
- have_rb_cairo_h = have_header('rb_cairo.h')
331
- unless have_rb_cairo_h
353
+ if rcairo_source_dir.nil?
332
354
  begin
333
355
  require 'rubygems'
334
- rcairo_gem = Gem.cache.find_name("cairo").sort_by do |gem|
335
- gem.version
336
- end.last
337
- if rcairo_gem
338
- rcairo_source_dir = rcairo_gem.full_gem_path
339
- rb_cairo_h_dir = File.join(rcairo_source_dir, "ext", "cairo")
340
- $CFLAGS += " -I#{rb_cairo_h_dir} "
341
- have_rb_cairo_h = have_header('rb_cairo.h')
342
- else
343
- require "cairo"
344
- rcairo_source_dir = File.dirname($".grep(/cairo\.(?!rb\z)\w+\z/).first)
345
- rb_cairo_h_dir = rcairo_source_dir
346
- $CFLAGS += " -I#{rcairo_h_dir} "
347
- have_rb_cairo_h = have_header('rb_cairo.h')
356
+ cairo_gem_spec = Gem.source_index.find_name("cairo").last
357
+ if cairo_gem_spec
358
+ rcairo_source_dir = cairo_gem_spec.full_gem_path
348
359
  end
349
360
  rescue LoadError
350
361
  end
351
362
  end
363
+ return false if rcairo_source_dir.nil?
352
364
 
353
- if have_rb_cairo_h
354
- if /mingw|cygwin|mswin32/ =~ RUBY_PLATFORM
355
- options = {}
356
- build_dir = "tmp/#{RUBY_PLATFORM}/cairo/#{RUBY_VERSION}"
357
- if File.exist?(File.join(rcairo_source_dir, build_dir))
358
- options[:target_build_dir] = build_dir
359
- end
360
- add_depend_package("cairo", "ext/cairo", rcairo_source_dir, options)
361
- $defs << "-DRUBY_CAIRO_PLATFORM_WIN32"
365
+ if /mingw|cygwin|mswin32/ =~ RUBY_PLATFORM
366
+ options = {}
367
+ build_dir = "tmp/#{RUBY_PLATFORM}/cairo/#{RUBY_VERSION}"
368
+ if File.exist?(File.join(rcairo_source_dir, build_dir))
369
+ options[:target_build_dir] = build_dir
362
370
  end
371
+ add_depend_package("cairo", "ext/cairo", rcairo_source_dir, options)
372
+ $defs << "-DRUBY_CAIRO_PLATFORM_WIN32"
363
373
  end
364
- have_rb_cairo_h
374
+
375
+ $CFLAGS += " -I#{rcairo_source_dir}/ext/cairo"
376
+ PKGConfig.have_package('cairo') and have_header('rb_cairo.h')
365
377
  end
366
378
 
367
379
  add_include_path = Proc.new do |dir_variable|
@@ -1,3 +1,8 @@
1
+ === 2.1.2 / 2010-11-25
2
+
3
+ * 1 enhanchement
4
+ * support auto runner prepare hook.
5
+
1
6
  === 2.1.1 / 2010-07-29
2
7
 
3
8
  * 1 bug fix
@@ -78,7 +78,7 @@ require "test/unit"</pre>
78
78
  </p>
79
79
  <h3 id="test-unit-latest">test-unit: The latest release</h3>
80
80
  <p>
81
- 2.1.1 is the latest release. It had been released at 2010-07-29.
81
+ 2.1.2 is the latest release. It had been released at 2010-11-25.
82
82
  </p>
83
83
  <h3 id="test-unit-install">test-unit: Install</h3>
84
84
  <p>
@@ -112,7 +112,7 @@ require "test/unit"</pre>
112
112
  </p>
113
113
  <h3 id="test-unit-notify-latest">test-unit-notify: The latest release</h3>
114
114
  <p>
115
- 0.0.1 is the latest release. It had been released at 2010-07-17.
115
+ 0.1.0 is the latest release. It had been released at 2010-11-25.
116
116
  </p>
117
117
  <h3 id="test-unit-notify-install">test-unit-notify: Install</h3>
118
118
  <p>
@@ -91,7 +91,7 @@ require "test/unit"</pre>
91
91
  </p>
92
92
  <h3 id="test-unit-latest">test-unit最新リリース</h3>
93
93
  <p>
94
- 2010-07-29にリリースされた2.1.1が最新リリースです。
94
+ 2010-11-25にリリースされた2.1.2が最新リリースです。
95
95
  </p>
96
96
  <h3 id="test-unit-install">test-unitのインストール</h3>
97
97
  <p>
@@ -133,7 +133,7 @@ require "test/unit"</pre>
133
133
  </p>
134
134
  <h3 id="test-unit-notify-latest">test-unit-notify最新リリース</h3>
135
135
  <p>
136
- 2010-07-17にリリースされた0.0.1が最新リリースです。
136
+ 2010-11-25にリリースされた0.1.0が最新リリースです。
137
137
  </p>
138
138
  <h3 id="test-unit-notify-install">test-unit-notifyのインストール</h3>
139
139
  <p>
@@ -579,6 +579,7 @@ EOT
579
579
  "The arguments must respond to to_f; " +
580
580
  "the #{name} did not")
581
581
  end
582
+ delta = delta.to_f
582
583
  assert_operator(delta, :>=, 0.0, "The delta should not be negative")
583
584
  end
584
585
 
@@ -597,12 +598,16 @@ EOT
597
598
  if normalized_actual < normalized_expected - normalized_delta
598
599
  relation_format = "<<?> < <?>-<?>(?) <= <?>+<?>(?)>"
599
600
  relation_arguments = [actual_float,
600
- expected_float, delta, expected_float - delta,
601
- expected_float, delta, expected_float + delta]
601
+ expected_float, delta,
602
+ normalized_expected - normalized_delta,
603
+ expected_float, delta,
604
+ normalized_expected + normalized_delta]
602
605
  elsif normalized_expected - normalized_delta < normalized_actual
603
606
  relation_format = "<<?>-<?>(?) <= <?>+<?>(?) < <?>>"
604
- relation_arguments = [expected_float, delta, expected_float - delta,
605
- expected_float, delta, expected_float + delta,
607
+ relation_arguments = [expected_float, delta,
608
+ normalized_expected - normalized_delta,
609
+ expected_float, delta,
610
+ normalized_expected + normalized_delta,
606
611
  actual_float]
607
612
  end
608
613
 
@@ -7,6 +7,7 @@ module Test
7
7
  RUNNERS = {}
8
8
  COLLECTORS = {}
9
9
  ADDITIONAL_OPTIONS = []
10
+ PREPARE_HOOKS = []
10
11
 
11
12
  class << self
12
13
  def register_runner(id, runner_builder=Proc.new)
@@ -43,15 +44,20 @@ module Test
43
44
  def setup_option(option_builder=Proc.new)
44
45
  ADDITIONAL_OPTIONS << option_builder
45
46
  end
47
+
48
+ def prepare(hook=Proc.new)
49
+ PREPARE_HOOKS << hook
50
+ end
46
51
  end
47
52
 
48
53
  def self.run(force_standalone=false, default_dir=nil, argv=ARGV, &block)
49
54
  r = new(force_standalone || standalone?, &block)
50
55
  r.base = default_dir
56
+ r.prepare
51
57
  r.process_args(argv)
52
58
  r.run
53
59
  end
54
-
60
+
55
61
  def self.standalone?
56
62
  return false unless("-e" == $0)
57
63
  ObjectSpace.each_object(Class) do |klass|
@@ -123,6 +129,12 @@ module Test
123
129
  yield(self) if block_given?
124
130
  end
125
131
 
132
+ def prepare
133
+ PREPARE_HOOKS.each do |handler|
134
+ handler.call(self)
135
+ end
136
+ end
137
+
126
138
  def process_args(args = ARGV)
127
139
  begin
128
140
  args.unshift(*@default_arguments)
@@ -27,6 +27,7 @@ module Test
27
27
  @name = name
28
28
  @tests = []
29
29
  @test_case = test_case
30
+ @n_tests = 0
30
31
  end
31
32
 
32
33
  # Runs the tests and/or suites contained in this
@@ -34,7 +35,8 @@ module Test
34
35
  def run(result, &progress_block)
35
36
  yield(STARTED, name)
36
37
  run_startup(result)
37
- @tests.each do |test|
38
+ while test = @tests.shift
39
+ @n_tests += test.size
38
40
  test.run(result, &progress_block)
39
41
  end
40
42
  run_shutdown(result)
@@ -55,7 +57,7 @@ module Test
55
57
  # i.e. if the suite contains other suites, it counts the
56
58
  # tests within those suites, not the suites themselves.
57
59
  def size
58
- total_size = 0
60
+ total_size = @n_tests
59
61
  @tests.each { |test| total_size += test.size }
60
62
  total_size
61
63
  end
@@ -2,6 +2,6 @@
2
2
  # HACK: quick and dirty to get integrated into the new project - ryan
3
3
  module Test
4
4
  module Unit
5
- VERSION = '2.1.2'
5
+ VERSION = '2.1.3'
6
6
  end
7
7
  end
@@ -284,8 +284,15 @@ module Test
284
284
  def test_startup_shutdown
285
285
  called = []
286
286
  test_case = Class.new(TestCase) do
287
- @@called = called
288
287
  class << self
288
+ def called
289
+ @@called
290
+ end
291
+
292
+ def called=(called)
293
+ @@called = called
294
+ end
295
+
289
296
  def startup
290
297
  @@called << :startup
291
298
  end
@@ -294,13 +301,14 @@ module Test
294
301
  @@called << :shutdown
295
302
  end
296
303
  end
304
+ self.called = called
297
305
 
298
306
  def setup
299
- @@called << :setup
307
+ self.class.called << :setup
300
308
  end
301
309
 
302
310
  def teardown
303
- @@called << :teardown
311
+ self.class.called << :teardown
304
312
  end
305
313
 
306
314
  def test1