test-unit-context 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8523381664878238015d48111fef51cdbbf845a2
4
- data.tar.gz: e71b2ab94d3ab5aeb9e8b1548d77d9e52dcbcc4b
3
+ metadata.gz: b2b74eda8d17c70a42e4f4e4012f5db75165b0f4
4
+ data.tar.gz: 801d51680aeb9b80be2c6d2a709fc21d3918577c
5
5
  SHA512:
6
- metadata.gz: d3b254701151d71463055ed77409ec212f295109586260d650060dc31db4ab0e73d3bf30891c4fa3c57e5c70e011f191c2377314179f853dfe4820cc90a7f417
7
- data.tar.gz: 415c8f1c4792dd7c605539ac2c7730f3c4bbce78aae396f988475cc000b2b8b2409b237e4111a6d881c78c04419d9fe1d1df57f957bd40b3bb1f6407ba1423bf
6
+ metadata.gz: fe11be327ef6489dabf2d072862a95afdff47bf460b76b3c8eaa650aefc33edffba7922c86813333e55cc202ec5c01b4d0ced6b1067ae7efc97f14cef7a373a0
7
+ data.tar.gz: 96fc5b5786d2dfd94acf17ee2fb0f69bf6a24d83bf46d3bbd830aca3307f89c5a6a957c7b8ad4b09b9454b24c58c7584e0b1ee88811d5f58b73e7db81440415a
@@ -2,5 +2,17 @@ language: ruby
2
2
  rvm:
3
3
  - 1.8.7
4
4
  - 1.9.3
5
- - jruby-18mode
6
- - jruby-19mode
5
+ - 2.1.5
6
+ - jruby-1.6.8
7
+ - jruby-1.7.16
8
+ jdk:
9
+ - openjdk7
10
+ env:
11
+ - TEST_UNIT="~> 2.5.5"
12
+ - TEST_UNIT="~> 3.0.9"
13
+ matrix:
14
+ exclude:
15
+ - rvm: 1.8.7
16
+ env: TEST_UNIT="~> 3.0.9"
17
+ - rvm: jruby-1.6.8
18
+ env: TEST_UNIT="~> 3.0.9"
data/Gemfile CHANGED
@@ -4,4 +4,6 @@ gemspec
4
4
 
5
5
  if path = ENV['test-unit']
6
6
  gem 'test-unit', :path => path
7
- end
7
+ elsif version = ENV['TEST_UNIT']
8
+ gem 'test-unit', version
9
+ end
@@ -1,7 +1,7 @@
1
1
  module Test
2
2
  module Unit
3
3
  module Context
4
- VERSION = "0.4.0"
4
+ VERSION = '0.5.0'
5
5
  end
6
6
  end
7
- end
7
+ end
@@ -1,7 +1,13 @@
1
1
  require 'test/unit'
2
- require 'test/unit/testsuitecreator'
3
2
 
4
3
  module Test::Unit
4
+ unless const_defined? :TestSuiteCreator
5
+ begin
6
+ require 'test/unit/test-suite-creator' # TU 3.x
7
+ rescue LoadError
8
+ require 'test/unit/testsuitecreator' # <= 2.5.5
9
+ end
10
+ end
5
11
  TestSuiteCreator.class_eval do
6
12
 
7
13
  private
@@ -13,11 +19,17 @@ module Test::Unit
13
19
  methods -= test_case_super.public_instance_methods(true)
14
20
  test_case_super = test_case_super.superclass
15
21
  end
16
- test_names = methods.map(&:to_s).find_all do |method_name|
17
- method_name =~ /^test./ or @test_case.attributes(method_name)[:test]
22
+ methods.map!(&:to_s)
23
+ use_find_attribute = @test_case.respond_to?(:find_attribute)
24
+ test_names = methods.find_all do |method_name|
25
+ # method_name =~ /^test./
26
+ ( method_name.start_with?('test') && method_name.length > 4 ) ||
27
+ ( use_find_attribute ? # since Test-Unit 3.0
28
+ @test_case.find_attribute(method_name, :test) :
29
+ @test_case.attributes(method_name)[:test] )
18
30
  end
19
31
  send("sort_test_names_in_#{@test_case.test_order}_order", test_names)
20
32
  end
21
33
 
22
34
  end
23
- end
35
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-unit-context
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kares
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-22 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  version: '0'
91
91
  requirements: []
92
92
  rubyforge_project:
93
- rubygems_version: 2.2.1
93
+ rubygems_version: 2.2.2
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Context for Test::Unit (2.x)