test_declarative 0.0.5 → 0.0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: f1abe350f4b2d5452bb685e6b781939f8daae8cf
4
+ data.tar.gz: 8f5892c770153675c257c1a88ebd1a0d6a452d80
5
+ SHA512:
6
+ metadata.gz: 83c7fb5f03ed30efda0c3106f21cfe44c8b90a1e1e232ceaf508be999e691d3ed3e863bd16361d2cedbd11327864af3eb4f93f1d1d19bdb8ef1def623a18d9cd
7
+ data.tar.gz: bb7d8d03cc50a282eea5f0605e66e951178e193bd725f1a192e9a0b7c9a39ebd72c060b20718f396c0d2354ef3e8caa42a3700353ed55c6b1a85b9da4aefbc09
@@ -0,0 +1,15 @@
1
+ # TestDeclarative
2
+
3
+ [![Build Status](https://api.travis-ci.org/svenfuchs/test_declarative.svg?branch=master)](https://travis-ci.org/svenfuchs/test_declarative)
4
+
5
+ Simply adds a declarative test method syntax to test/unit.
6
+
7
+ ```ruby
8
+ require 'test_declarative'
9
+
10
+ class MyTest < Test::Unit::TestCase
11
+ test "your test description" do
12
+ # your test code
13
+ end
14
+ end
15
+ ```
@@ -1,8 +1,14 @@
1
1
  targets = [Module]
2
2
  targets << Test::Unit::TestCase if defined?(Test::Unit::TestCase)
3
3
  targets << MiniTest::Unit::TestCase if defined?(MiniTest::Unit::TestCase)
4
+ targets << Minitest::Test if defined?(Minitest::Test)
4
5
 
5
6
  targets.each do |target|
7
+ if target.respond_to? :test
8
+ warn "test_declarative is deprecated for #{target}"
9
+ next
10
+ end
11
+
6
12
  target.class_eval do
7
13
  def test(name, &block)
8
14
  test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym
@@ -1,3 +1,3 @@
1
1
  module TestDeclarative
2
- VERSION = '0.0.5'
3
- end
2
+ VERSION = '0.0.6'
3
+ end
metadata CHANGED
@@ -1,73 +1,47 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: test_declarative
3
- version: !ruby/object:Gem::Version
4
- hash: 21
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 5
10
- version: 0.0.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.6
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Sven Fuchs
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2010-12-26 00:00:00 +01:00
19
- default_executable:
11
+ date: 2017-05-23 00:00:00.000000000 Z
20
12
  dependencies: []
21
-
22
13
  description: Simply adds a declarative test method syntax to test/unit.
23
14
  email: svenfuchs@artweb-design.de
24
15
  executables: []
25
-
26
16
  extensions: []
27
-
28
17
  extra_rdoc_files: []
29
-
30
- files:
31
- - lib/test_declarative/version.rb
32
- - lib/test_declarative.rb
33
- - test/test_declarative_test.rb
18
+ files:
34
19
  - MIT-LICENSE
35
- - README.textile
36
- has_rdoc: true
20
+ - README.md
21
+ - lib/test_declarative.rb
22
+ - lib/test_declarative/version.rb
37
23
  homepage: http://github.com/svenfuchs/test_declarative
38
- licenses: []
39
-
24
+ licenses:
25
+ - MIT
26
+ metadata: {}
40
27
  post_install_message:
41
28
  rdoc_options: []
42
-
43
- require_paths:
29
+ require_paths:
44
30
  - lib
45
- required_ruby_version: !ruby/object:Gem::Requirement
46
- none: false
47
- requirements:
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
48
33
  - - ">="
49
- - !ruby/object:Gem::Version
50
- hash: 3
51
- segments:
52
- - 0
53
- version: "0"
54
- required_rubygems_version: !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
57
38
  - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 23
60
- segments:
61
- - 1
62
- - 3
63
- - 6
39
+ - !ruby/object:Gem::Version
64
40
  version: 1.3.6
65
41
  requirements: []
66
-
67
42
  rubyforge_project: "[none]"
68
- rubygems_version: 1.3.7
43
+ rubygems_version: 2.5.2
69
44
  signing_key:
70
- specification_version: 3
45
+ specification_version: 4
71
46
  summary: Simply adds a declarative test method syntax to test/unit
72
47
  test_files: []
73
-
@@ -1,13 +0,0 @@
1
- h1. TestDeclarative
2
-
3
- Simply adds a declarative test method syntax to test/unit.
4
-
5
- <pre>
6
- require 'test-declarative'
7
-
8
- class MyTest < Test::Unit::TestCase
9
- test "your test description" do
10
- # your test code
11
- end
12
- end
13
- </pre>
@@ -1,17 +0,0 @@
1
- $: << File.expand_path('../../lib', __FILE__)
2
-
3
- require 'test/unit'
4
- require 'test_declarative'
5
-
6
- class TestDeclarativeTest < Test::Unit::TestCase
7
- def test_responds_to_test
8
- assert self.class.respond_to?(:test)
9
- end
10
-
11
- def test_adds_a_test_method
12
- called = false
13
- assert_nothing_raised { Test::Unit::TestCase.test('some test') { called = true } }
14
- Test::Unit::TestCase.new(:'test_some_test').run((RUBY_VERSION < '1.9.1' ? Test::Unit::TestResult : MiniTest::Unit).new) {}
15
- assert called
16
- end
17
- end