microtest 0.1.0 → 0.1.1

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.
data/.ruby CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
+ source:
3
+ - meta
2
4
  authors:
3
- - name: Thomas Sawyer
5
+ - name: Trans
4
6
  email: transfire@gmail.com
5
7
  copyrights:
6
- - holder: Thomas Sawyer
8
+ - holder: Rubyworks
7
9
  year: '2011'
8
10
  license: BSD-2-Clause
9
- replacements: []
10
- conflicts: []
11
11
  requirements:
12
- - name: test
12
+ - name: rubytest
13
13
  - name: detroit
14
14
  groups:
15
15
  - build
@@ -23,24 +23,27 @@ requirements:
23
23
  - test
24
24
  development: true
25
25
  dependencies: []
26
+ alternatives: []
27
+ conflicts: []
26
28
  repositories:
27
- - uri: git://github.com/proutils/microtest.git
29
+ - uri: git://github.com/rubyworks/microtest.git
28
30
  scm: git
29
31
  name: upstream
30
32
  resources:
31
33
  home: http://rubyworks.github.com/microtest
32
34
  code: http://github.com/rubyworks/microtest
35
+ extra: {}
33
36
  load_path:
34
37
  - lib
35
- extra:
36
- manifest: MANIFEST
37
- alternatives: []
38
38
  revision: 0
39
- name: microtest
40
- title: MicroTest
41
39
  summary: Microminal TestUnit-style Test Framework
42
- description: MicroTest is very small Test::Unit/MiniTest compatbile test framework
43
- that run on top of the Ruby Universal Test Harness (Ruby Test).
44
- organization: RubyWorks
45
- version: 0.1.0
46
- date: '2011-08-11'
40
+ title: MicroTest
41
+ version: 0.1.1
42
+ name: microtest
43
+ description: ! 'MicroTest is very small Test::Unit/MiniTest compatbile
44
+
45
+ test framework that run on top of the Ruby Universal
46
+
47
+ Test Harness (Ruby Test).'
48
+ organization: Rubyworks
49
+ date: '2012-03-02'
File without changes
@@ -0,0 +1,28 @@
1
+ MicroTest - Traditional Style Test Framework
2
+ http://rubyworks.github.com/microtest
3
+
4
+ Copyright (c) 2011 RubyWorks. All rights reserved.
5
+
6
+ BSD-2-Clause (aka FreeBSD) License
7
+
8
+ Redistribution and use in source and binary forms, with or without
9
+ modification, are permitted provided that the following conditions are met:
10
+
11
+ 1. Redistributions of source code must retain the above copyright notice,
12
+ this list of conditions and the following disclaimer.
13
+
14
+ 2. Redistributions in binary form must reproduce the above copyright
15
+ notice, this list of conditions and the following disclaimer in the
16
+ documentation and/or other materials provided with the distribution.
17
+
18
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
19
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
21
+ COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
22
+ INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
25
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
27
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+
data/README.md CHANGED
@@ -2,16 +2,30 @@
2
2
 
3
3
  ## Description
4
4
 
5
- MicroTest is a minimal Test::Unit and MiniTest campatible
5
+ MicroTest is a minimal Test::Unit and MiniTest compatible
6
6
  test framework that runs on top of Ruby Test.
7
7
 
8
- ## Synopsis
8
+ ## Installation
9
9
 
10
- MicroTests are written in essentially the same manner as Ruby standard
11
- test frameworks.
10
+ Using Rubygems:
11
+
12
+ $ gem install microtest
13
+
14
+
15
+ ## Instruction
16
+
17
+ Tests are written in the same manner as they are for Ruby's
18
+ traditional test framework(s). The only significant difference
19
+ is that an assertions framework library needs to be required
20
+ along with the test library itself. MicroTest comes with a
21
+ traditional assertions system for backward compatability
22
+ with TestUnit and MiniTest. Simply require `microtest/assertion`
23
+ to get it. Alternatively any BRASS compliant assertion framework
24
+ can be used.
12
25
 
13
26
  ```ruby
14
- require 'microtest/assertions' # for legacy assertion methods
27
+ require 'microtest'
28
+ require 'microtest/assertions'
15
29
 
16
30
  class ExampleTest < MicroTest::TestCase
17
31
 
@@ -28,22 +42,31 @@ class ExampleTest < MicroTest::TestCase
28
42
  end
29
43
  ```
30
44
 
31
- For drop in compatability with Test::Unit, load `microtest/test/unit`.
45
+ For drop in compatibility with Test::Unit, load `microtest/testunit`.
32
46
 
33
47
  ```ruby
34
- require 'microtest/unit'
48
+ require 'microtest/testunit'
49
+ require 'microtest/assertions'
35
50
 
36
51
  class ExampleTest < Test::Unit::TestCase
37
52
  ...
38
53
  end
39
54
  ```
40
55
 
41
- # Copyrights and Licensing
56
+ To run tests use the `rubytest` command line utility.
42
57
 
43
- Copyright (c) 2011 Thomas Sawyer, Rubyworks
58
+ ```
59
+ $ rubytest -Ilib test/test_example.rb
60
+ ```
44
61
 
45
- MicroTest is distributes under the terms of the **FreeBSD** license.
62
+ See [RubyTest](http://rubyworks.github.com/rubytest) for more details on this.
63
+
64
+
65
+ ## License
46
66
 
47
- See COPYING.rdoc for more information.
67
+ Copyright (c) 2011 Rubyworks
68
+
69
+ MicroTest is distributes under the terms of the **FreeBSD** license.
48
70
 
71
+ See License.txt for details.
49
72
 
File without changes
@@ -1,14 +1,14 @@
1
- require 'microtest'
2
- require 'microtest/assertions'
3
-
4
1
  class ExampleTest < MicroTest::TestCase
5
2
 
3
+ #
6
4
  def setup
7
5
  @a = 1
8
6
  end
9
7
 
10
- def test_example_of_passing_test
8
+ #
9
+ def test_alpha_is_one
11
10
  assert_equal(1, @a)
12
11
  end
13
12
 
14
13
  end
14
+
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: microtest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - Thomas Sawyer
8
+ - Trans
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-11 00:00:00.000000000 Z
12
+ date: 2012-03-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: test
16
- requirement: &12648320 !ruby/object:Gem::Requirement
15
+ name: rubytest
16
+ requirement: &23971160 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *12648320
24
+ version_requirements: *23971160
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: detroit
27
- requirement: &12646440 !ruby/object:Gem::Requirement
27
+ requirement: &23970500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *12646440
35
+ version_requirements: *23970500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: reap
38
- requirement: &15175400 !ruby/object:Gem::Requirement
38
+ requirement: &23969840 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *15175400
46
+ version_requirements: *23969840
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: qed
49
- requirement: &15174900 !ruby/object:Gem::Requirement
49
+ requirement: &23969280 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,35 +54,32 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *15174900
58
- description: MicroTest is very small Test::Unit/MiniTest compatbile test framework
59
- that run on top of the Ruby Universal Test Harness (Ruby Test).
57
+ version_requirements: *23969280
58
+ description: ! 'MicroTest is very small Test::Unit/MiniTest compatbile
59
+
60
+ test framework that run on top of the Ruby Universal
61
+
62
+ Test Harness (Ruby Test).'
60
63
  email:
61
64
  - transfire@gmail.com
62
65
  executables: []
63
66
  extensions: []
64
67
  extra_rdoc_files:
65
- - COPYING.rdoc
66
- - HISTORY.md
68
+ - License.txt
67
69
  - README.md
70
+ - History.md
68
71
  files:
69
- - .gemspec
70
72
  - .ruby
71
- - Assembly
72
- - COPYING.rdoc
73
- - HISTORY.md
74
- - MANIFEST
75
- - PROFILE
76
- - README.md
77
- - VERSION
78
- - lib/microtest.rb
79
73
  - lib/microtest/assertions.rb
80
- - lib/microtest/unit.rb
81
- - try/.test
82
- - try/test_example.rb
83
- - try/test_unit_example.rb
74
+ - lib/microtest/testunit.rb
75
+ - lib/microtest.rb
76
+ - test/test_case.rb
77
+ - README.md
78
+ - History.md
79
+ - License.txt
84
80
  homepage: http://rubyworks.github.com/microtest
85
- licenses: []
81
+ licenses:
82
+ - BSD-2-Clause
86
83
  post_install_message:
87
84
  rdoc_options: []
88
85
  require_paths:
@@ -101,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
98
  version: '0'
102
99
  requirements: []
103
100
  rubyforge_project:
104
- rubygems_version: 1.8.5
101
+ rubygems_version: 1.8.11
105
102
  signing_key:
106
103
  specification_version: 3
107
104
  summary: Microminal TestUnit-style Test Framework
data/.gemspec DELETED
@@ -1,152 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'yaml'
4
-
5
- Gem::Specification.new do |gemspec|
6
-
7
- manifest = Dir.glob('manifest{,.txt)', File::FNM_CASEFOLD).first
8
-
9
- scm = case
10
- when File.directory?('.git')
11
- :git
12
- end
13
-
14
- files = case
15
- when manifest
16
- File.readlines(manifest).
17
- map{ |line| line.srtip }.
18
- reject{ |line| line.empty? || line[0,1] == '#' }
19
- when scm == :git
20
- `git ls-files -z`.split("\0")
21
- else
22
- Dir.glob('{**/}{.*,*}') # TODO: be more specific using standard locations ?
23
- end.select{ |path| File.file?(path) }
24
-
25
- patterns = {
26
- :bin_files => 'bin/*',
27
- :lib_files => 'lib/{**/}*.rb',
28
- :ext_files => 'ext/{**/}extconf.rb',
29
- :doc_files => '*.{txt,rdoc,md,markdown,tt,textile}',
30
- :test_files => '{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'
31
- }
32
-
33
- glob_files = lambda { |pattern|
34
- Dir.glob(pattern).select { |path|
35
- File.file?(path) && files.include?(path)
36
- }
37
- }
38
-
39
- #files = glob_files[patterns[:files]]
40
-
41
- executables = glob_files[patterns[:bin_files]].map do |path|
42
- File.basename(path)
43
- end
44
-
45
- extensions = glob_files[patterns[:ext_files]].map do |path|
46
- File.basename(path)
47
- end
48
-
49
- metadata = YAML.load_file('.ruby')
50
-
51
- # build-out the gemspec
52
-
53
- case metadata['revision']
54
- when 0
55
- gemspec.name = metadata['name']
56
- gemspec.version = metadata['version']
57
- gemspec.summary = metadata['summary']
58
- gemspec.description = metadata['description']
59
-
60
- metadata['authors'].each do |author|
61
- gemspec.authors << author['name']
62
-
63
- if author.has_key?('email')
64
- if gemspec.email
65
- gemspec.email << author['email']
66
- else
67
- gemspec.email = [author['email']]
68
- end
69
- end
70
- end
71
-
72
- gemspec.licenses = metadata['licenses']
73
-
74
- metadata['requirements'].each do |req|
75
- name = req['name']
76
- version = req['version']
77
- groups = req['groups'] || []
78
-
79
- if md = /^(.*?)([+-~])$/.match(version)
80
- version = case md[2]
81
- when '+' then ">= #{$1}"
82
- when '-' then "< #{$1}"
83
- when '~' then "~> #{$1}"
84
- else version
85
- end
86
- end
87
-
88
- #development = req['development']
89
- #if development
90
- # # populate development dependencies
91
- # if gemspec.respond_to?(:add_development_dependency)
92
- # gemspec.add_development_dependency(name,*version)
93
- # else
94
- # gemspec.add_dependency(name,*version)
95
- # end
96
- #else
97
- # # populate runtime dependencies
98
- # if gemspec.respond_to?(:add_runtime_dependency)
99
- # gemspec.add_runtime_dependency(name,*version)
100
- # else
101
- # gemspec.add_dependency(name,*version)
102
- # end
103
- #end
104
-
105
- if groups.empty? or groups.include?('runtime')
106
- # populate runtime dependencies
107
- if gemspec.respond_to?(:add_runtime_dependency)
108
- gemspec.add_runtime_dependency(name,*version)
109
- else
110
- gemspec.add_dependency(name,*version)
111
- end
112
- else
113
- # populate development dependencies
114
- if gemspec.respond_to?(:add_development_dependency)
115
- gemspec.add_development_dependency(name,*version)
116
- else
117
- gemspec.add_dependency(name,*version)
118
- end
119
- end
120
- end
121
-
122
- # convert external dependencies into a requirements
123
- if metadata['external_dependencies']
124
- ##gemspec.requirements = [] unless metadata['external_dependencies'].empty?
125
- metadata['external_dependencies'].each do |req|
126
- gemspec.requirements << req.to_s
127
- end
128
- end
129
-
130
- # determine homepage from resources
131
- homepage = metadata['resources'].find{ |key, url| key =~ /^home/ }
132
- gemspec.homepage = homepage.last if homepage
133
-
134
- gemspec.require_paths = metadata['load_path'] || ['lib']
135
- gemspec.post_install_message = metadata['install_message']
136
-
137
- # RubyGems specific metadata
138
- gemspec.files = files
139
- gemspec.extensions = extensions
140
- gemspec.executables = executables
141
-
142
- if Gem::VERSION < '1.7.'
143
- gemspec.default_executable = gemspec.executables.first
144
- end
145
-
146
- gemspec.test_files = glob_files[patterns[:test_files]]
147
-
148
- unless gemspec.files.include?('.document')
149
- gemspec.extra_rdoc_files = glob_files[patterns[:doc_files]]
150
- end
151
- end
152
- end
data/Assembly DELETED
@@ -1,46 +0,0 @@
1
- ---
2
- github:
3
- active: true
4
-
5
- gem:
6
- active: true
7
-
8
- dnote:
9
- labels: ~
10
- output: log/NOTES.rdoc
11
-
12
- yard:
13
- yardopts: true
14
-
15
- qed:
16
- files : ~
17
- #exclude : ~
18
- #loadpath: ~
19
- #requires: ~
20
- #live : false
21
- active : false
22
-
23
- qedoc:
24
- files : spec/
25
- output: QED.rdoc
26
- active: false
27
-
28
- vclog:
29
- output: log/ChangeLog.rdoc
30
- active: false
31
-
32
- email:
33
- service: Email
34
- file : ~
35
- subject: ~
36
- mailto :
37
- - ruby-talk@ruby-lang.org
38
- - rubyworks-mailinglist@googlegroups.com
39
- from : <%= ENV['EMAIL_ACCOUNT'] %>
40
- server : <%= ENV['EMAIL_SERVER'] %>
41
- port : <%= ENV['EMAIL_PORT'] %>
42
- account: <%= ENV['EMAIL_ACCOUNT'] %>
43
- domain : <%= ENV['EMAIL_DOMAIN'] %>
44
- login : <%= ENV['EMAIL_LOGIN'] %>
45
- secure : <%= ENV['EMAIL_SECURE'] %>
46
-
@@ -1,31 +0,0 @@
1
- = COPYRIGHT NOTICES
2
-
3
- == MicroTest
4
-
5
- Copyright:: (c) 2011 Thomas Sawyer, RubyWorks
6
- License:: BSD-2-Clause
7
- Website:: http://rubyworks.github.com/microtest
8
-
9
- Copyright 2011 Thomas Sawyer. All rights reserved.
10
-
11
- Redistribution and use in source and binary forms, with or without
12
- modification, are permitted provided that the following conditions are met:
13
-
14
- 1. Redistributions of source code must retain the above copyright notice,
15
- this list of conditions and the following disclaimer.
16
-
17
- 2. Redistributions in binary form must reproduce the above copyright
18
- notice, this list of conditions and the following disclaimer in the
19
- documentation and/or other materials provided with the distribution.
20
-
21
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
22
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
23
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
24
- COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26
- NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
28
- OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
-
data/MANIFEST DELETED
@@ -1,9 +0,0 @@
1
- #!mast .ruby .yaropts bin lib spec test [A-Z][A-Z]*
2
- .ruby
3
- lib/microtest/assertions.rb
4
- lib/microtest/unit.rb
5
- lib/microtest.rb
6
- PROFILE
7
- HISTORY.md
8
- README.md
9
- COPYING.rdoc
data/PROFILE DELETED
@@ -1,30 +0,0 @@
1
- ---
2
- name : microtest
3
- title : MicroTest
4
- summary: Microminal TestUnit-style Test Framework
5
- authors:
6
- - Thomas Sawyer <transfire@gmail.com>
7
-
8
- description:
9
- MicroTest is very small Test::Unit/MiniTest compatbile
10
- test framework that run on top of the Ruby Universal
11
- Test Harness (Ruby Test).
12
-
13
- resources:
14
- home: http://rubyworks.github.com/microtest
15
- code: http://github.com/rubyworks/microtest
16
-
17
- repositories:
18
- upstream: git://github.com/proutils/microtest.git
19
-
20
- requirements:
21
- - test
22
- - detroit (build)
23
- - reap (build)
24
- - qed (test)
25
-
26
- organization: RubyWorks
27
-
28
- copyrights:
29
- - 2011 Thomas Sawyer (BSD-2-Clause)
30
-
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.0
data/try/.test DELETED
@@ -1,2 +0,0 @@
1
- $:.unshift(File.dirname(__FILE__)+'/../lib')
2
-
@@ -1,15 +0,0 @@
1
- require 'microtest/unit'
2
- require 'microtest/assertions'
3
-
4
- class ExampleTest < Test::Unit::TestCase
5
-
6
- def setup
7
- @a = 1
8
- end
9
-
10
- def test_example_of_passing_test
11
- assert_equal(1, @a)
12
- end
13
-
14
- end
15
-