tap_out 0.0.1 → 0.0.2

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 @@
1
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (C) 2011 by Ian Young
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,21 @@
1
+ # TapOut #
2
+
3
+ A test harness for Test::Unit to parse the Test Anything Protocol.
4
+
5
+ This means that you can run PHPUnit tests (or others) alongside the rest of
6
+ your test suite. They'll report failures the same way, and pick up any
7
+ formatting from packages like `redgreen` or `turn`.
8
+
9
+ ## How's it work? ##
10
+
11
+ require 'test/phpunit'
12
+ class PHPTest < ActiveSupport::TestCase
13
+ extend Test::PHPUnit
14
+ phpunit "test/phpunit/", :configuration => 'test/phpunit/phpunit.xml.dist'
15
+ end
16
+
17
+ ## What's missing? ##
18
+
19
+ * Safe command line execution
20
+ * Tests
21
+ * Anything besides PHPUnit
@@ -1,3 +1,3 @@
1
1
  module TapOut
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,4 +1,5 @@
1
1
  require 'test/tap/test_suite'
2
+ require 'test/unit'
2
3
 
3
4
  module Test
4
5
  module PHPUnit
@@ -12,7 +12,9 @@ module Test
12
12
  dummy, ok, failure, case_name, test_name = /^(ok|not ok) \d+ - ((?:\w+: )?)(\w+)::(.+)$/.match(@tap_line).to_a
13
13
  name = "#{sanitize_test_name test_name}(#{case_name})"
14
14
  yield(Test::Unit::TestCase::STARTED, name)
15
- if ok == 'not ok'
15
+ if ok.nil?
16
+ result.add_error( RuntimeError.new @tap_line)
17
+ elsif ok == 'not ok'
16
18
  if failure.chomp(': ') == 'Failure'
17
19
  # If PHPUnit would return more info, we could fill this out
18
20
  result.add_failure(Test::Unit::Failure.new(name, [], failure_message))
@@ -15,7 +15,7 @@ module Test
15
15
  yaml_content += line until (line=phpunit.gets) =~ /\A\s*\.\.\.\Z/
16
16
  @current_case.parse_details yaml_content
17
17
  else
18
- @current_case.run(result, &progress_block) if @current_case.present?
18
+ @current_case.run(result, &progress_block) if ! @current_case.nil?
19
19
  @current_case = TestCase.new(line)
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tap_out
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ian Young
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-04 00:00:00 -07:00
19
- default_executable:
18
+ date: 2011-12-23 00:00:00 Z
20
19
  dependencies: []
21
20
 
22
21
  description: Use Test::Unit to run anything that uses the Test Anything Protocol.
@@ -29,14 +28,16 @@ extensions: []
29
28
  extra_rdoc_files: []
30
29
 
31
30
  files:
31
+ - .gitignore
32
32
  - Gemfile
33
+ - LICENSE
34
+ - README.md
33
35
  - Rakefile
34
36
  - lib/tap_out/version.rb
35
37
  - lib/test/phpunit.rb
36
38
  - lib/test/tap/test_case.rb
37
39
  - lib/test/tap/test_suite.rb
38
40
  - tap_out.gemspec
39
- has_rdoc: true
40
41
  homepage: ""
41
42
  licenses: []
42
43
 
@@ -66,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
67
  requirements: []
67
68
 
68
69
  rubyforge_project: tap_out
69
- rubygems_version: 1.6.2
70
+ rubygems_version: 1.8.11
70
71
  signing_key:
71
72
  specification_version: 3
72
73
  summary: TAP harness for Test::Unit