minitest_visible 0.0.1 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZTYzMDU0MGI2MTc0MWE5ZDgzOGY2MzRlZTEwNTc3OTg4NDUyZWRiZQ==
5
- data.tar.gz: !binary |-
6
- MmE0MDIxZDc0OGJjNTQ3ZTU2MzViMjY3YmUzODBlNzYwN2EwNDU1OA==
2
+ SHA256:
3
+ metadata.gz: e6ae120594dae3f2dd7a7c144b88f62ecc55aa94cb49015687e871ca5efc6849
4
+ data.tar.gz: 269efd136f1edc3eb093861aef05b7d7175af7f1575a140d79118ead21d6d6c0
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- MTMyODkxNjg0ZGJiYWFhNzAxMDk5MDA3MTFkNWEwZTBjY2E1MTA2ZjY1NmMw
10
- NTkzYjQ1ODYxYTRjM2Q4OTgyODE2ODVmZDEyYTFhOGZhMTY0MjFmMmMxZWRj
11
- NTVmNWJlYmM3MzY0MGRkMDk2MzViYWQ1ODI5ZDMwYTZkNDU3Mjk=
12
- data.tar.gz: !binary |-
13
- Y2FmYWRlNmY2YjgzNzAyMWQ0YTJlMjdjMzNkMDZlODZlZTJjYzM0ZjMyMzJh
14
- MDBhMmI2YzFiZTM1YmViMDkzZDVjMGM1YzBhYjA2ZGZlM2I3YjExY2I1OGFj
15
- ZmE4MGRkMDdkYWE0MTg2NzcxN2IxNzVkMGQ0MDk2ZWQ1ODQ0OTU=
6
+ metadata.gz: 1fe35932bb5667ee0e899d31c1861dde348c4fc3af0da43b81b4fa2c384da5201d7907d07e01c565f5ffbad5b5139362bb8755e0642edcc8a7037248ea4471f5
7
+ data.tar.gz: e37935077bd2f93aea7fc740fe572afc735d253b2d8032bd460f7155b29e33deed95b8b7770290b3f7c6d6d4e3676fadf35bfd1f1444beaf26e42618a21f9391
@@ -0,0 +1,49 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, and in the interest of
4
+ fostering an open and welcoming community, we pledge to respect all people who
5
+ contribute through reporting issues, posting feature requests, updating
6
+ documentation, submitting pull requests or patches, and other activities.
7
+
8
+ We are committed to making participation in this project a harassment-free
9
+ experience for everyone, regardless of level of experience, gender, gender
10
+ identity and expression, sexual orientation, disability, personal appearance,
11
+ body size, race, ethnicity, age, religion, or nationality.
12
+
13
+ Examples of unacceptable behavior by participants include:
14
+
15
+ * The use of sexualized language or imagery
16
+ * Personal attacks
17
+ * Trolling or insulting/derogatory comments
18
+ * Public or private harassment
19
+ * Publishing other's private information, such as physical or electronic
20
+ addresses, without explicit permission
21
+ * Other unethical or unprofessional conduct
22
+
23
+ Project maintainers have the right and responsibility to remove, edit, or
24
+ reject comments, commits, code, wiki edits, issues, and other contributions
25
+ that are not aligned to this Code of Conduct, or to ban temporarily or
26
+ permanently any contributor for other behaviors that they deem inappropriate,
27
+ threatening, offensive, or harmful.
28
+
29
+ By adopting this Code of Conduct, project maintainers commit themselves to
30
+ fairly and consistently applying these principles to every aspect of managing
31
+ this project. Project maintainers who do not follow or enforce the Code of
32
+ Conduct may be permanently removed from the project team.
33
+
34
+ This code of conduct applies both within project spaces and in public spaces
35
+ when an individual is representing the project or its community.
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
+ reported by contacting a project maintainer at peter.c.camilleri@gmail.com. All
39
+ complaints will be reviewed and investigated and will result in a response that
40
+ is deemed necessary and appropriate to the circumstances. Maintainers are
41
+ obligated to maintain confidentiality with regard to the reporter of an
42
+ incident.
43
+
44
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
+ version 1.3.0, available at
46
+ [http://contributor-covenant.org/version/1/3/0/][version]
47
+
48
+ [homepage]: http://contributor-covenant.org
49
+ [version]: http://contributor-covenant.org/version/1/3/0/
data/README.md CHANGED
@@ -7,6 +7,47 @@ little gem gives me the warm and fuzzy security blanket of seeing each test's
7
7
  filename as it is run and knowing what version of minitest is in charge without
8
8
  all the chaos of going fully verbose. A sample run follows:
9
9
 
10
+ C:\Sites\fOOrth>rake test
11
+ Run options: --seed 32173
12
+
13
+ # Running tests:
14
+
15
+ MiniTest version = 4.7.5
16
+
17
+ Running test file: array_test.rb
18
+ .
19
+ Running test file: complex_test.rb
20
+ .
21
+ Running test file: context_tests.rb
22
+ ........
23
+ Running test file: core_tests.rb
24
+ .........
25
+ Running test file: ctrl_stack_tests.rb
26
+ .
27
+ Running test file: data_stack_tests.rb
28
+ .....
29
+ Running test file: file_source_tests.rb
30
+ ....
31
+ Running test file: hash_test.rb
32
+ .
33
+ Running test file: numeric_test.rb
34
+ ..........
35
+ Running test file: object_test.rb
36
+ ...........
37
+ Running test file: parser_tests.rb
38
+ ........
39
+ Running test file: rational_test.rb
40
+ .
41
+ Running test file: string_test.rb
42
+ ...
43
+ Running test file: string_source_tests.rb
44
+ ....
45
+ Running test file: symbol_map_tests.rb
46
+ ...
47
+
48
+ Finished tests in 0.038003s, 1841.9598 tests/s, 11683.2882 assertions/s.
49
+
50
+ 70 tests, 444 assertions, 0 failures, 0 errors, 0 skips
10
51
 
11
52
  ## Installation
12
53
 
@@ -22,6 +63,9 @@ Or install it yourself as:
22
63
 
23
64
  $ gem install minitest_visible
24
65
 
66
+ The minitest_visible gem is at: ( https://rubygems.org/gems/minitest_visible )
67
+
68
+
25
69
  ## Usage
26
70
 
27
71
  Simply add the line:
@@ -30,9 +74,21 @@ Simply add the line:
30
74
 
31
75
  Then, in the body of your test class add:
32
76
 
33
- MinitestVisible.track self, __FILE__
77
+ include MinitestVisible
34
78
 
35
79
  That is all that is needed. Test output will now be decorated as shown above.
80
+ While this is a bit more ceremony than is desirable, test files have a fair bit
81
+ of boilerplate stuff as it is. The template folder has the file xyzzy_test.rb
82
+ which is my template for creating test files. Copy, rename and use as you wish.
83
+
84
+ ## Compatibility
85
+
86
+ The API of this gem is new compared to how it was under versions before 0.1.0.
87
+ Code using the older API will continue to work and tests will not suddenly
88
+ break (at least not due to minitest_visible). However, test files using the
89
+ obsolete API will now generate the following warning:
90
+
91
+ The track method is deprecated. Use include MinitestVisible instead.
36
92
 
37
93
  ## Contributing
38
94
 
@@ -41,3 +97,14 @@ That is all that is needed. Test output will now be decorated as shown above.
41
97
  3. Commit your changes (`git commit -am 'Add some feature'`)
42
98
  4. Push to the branch (`git push origin my-new-feature`)
43
99
  5. Create new Pull Request
100
+
101
+ ## License
102
+
103
+ The gem is available as open source under the terms of the
104
+ [MIT License](./LICENSE.txt).
105
+
106
+ ## Code of Conduct
107
+
108
+ Everyone interacting in the fully_freeze project’s codebases, issue trackers,
109
+ chat rooms and mailing lists is expected to follow the
110
+ [code of conduct](./CODE_OF_CONDUCT.md).
@@ -4,12 +4,18 @@ require "minitest_visible/version"
4
4
  #running of tests under the MiniTest gem.
5
5
  module MinitestVisible
6
6
 
7
- def self.track(target, file)
8
- action = lambda do |*all|
7
+ #Tracking via a module include.
8
+ def self.included(target)
9
+ file = (/^.+(?=:\d+:in)/.match(caller[0])).to_s
10
+
11
+ target.send(:define_method, :initialize) do |*all|
9
12
  unless defined? $minitest_visible_once_per_run
10
13
  $minitest_visible_once_per_run = :done
11
- puts "MiniTest version = #{MiniTest::Unit::VERSION}, " +
12
- "MinitestVisible version = #{MinitestVisible::VERSION}"
14
+ puts "MiniTest version = #{MiniTest::Unit::VERSION}"
15
+ end
16
+
17
+ unless defined? $minitest_visible_once_per_file
18
+ $minitest_visible_once_per_file = nil
13
19
  end
14
20
 
15
21
  if $minitest_visible_once_per_file != file
@@ -18,10 +24,26 @@ module MinitestVisible
18
24
  end
19
25
 
20
26
  super(*all)
27
+ end
28
+ end
21
29
 
30
+ #The older tracking mechanism. Deprecated.
31
+ def self.track(target, file)
32
+ target.send(:define_method, :initialize) do |*all|
33
+ unless defined? $minitest_visible_once_per_run
34
+ $minitest_visible_once_per_run = :done
35
+ puts "MiniTest version = #{MiniTest::Unit::VERSION}"
22
36
  end
23
37
 
24
- target.send(:define_method, :initialize, &action)
38
+ if $minitest_visible_once_per_file != file
39
+ puts "\nRunning test file: #{File.split(file)[1]}"
40
+ puts "The track method is deprecated. Use include MinitestVisible instead."
41
+ $minitest_visible_once_per_file = file
42
+ end
43
+
44
+ super(*all)
45
+ end
46
+
25
47
  end
26
48
 
27
49
  end
@@ -1,4 +1,4 @@
1
1
  module MinitestVisible
2
2
  #The version of this module.
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.3"
4
4
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.required_ruby_version = '>=1.9.3'
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.3"
23
+ spec.add_development_dependency "bundler", ">= 2.1.0"
24
24
  spec.add_development_dependency "rake"
25
25
  spec.add_development_dependency 'reek', "~> 1.3.8"
26
26
  spec.add_development_dependency 'rdoc', "~> 4.0.1"
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env rake
2
2
  # coding: utf-8
3
3
 
4
+ require 'rake/testtask'
4
5
  require 'rdoc/task'
5
6
  require "bundler/gem_tasks"
6
7
 
@@ -17,10 +18,17 @@ RDoc::Task.new do |rdoc|
17
18
  #rdoc.options << '--coverage-report'
18
19
 
19
20
  #Set a title.
20
- rdoc.options << '--title' << 'fOOrth Language Internals'
21
+ rdoc.options << '--title' << 'Minitest Visible Internals'
21
22
 
22
23
  end
23
24
 
25
+ #Run the fOOrth unit test suite.
26
+ Rake::TestTask.new do |t|
27
+ #List out all the test files.
28
+ t.test_files = FileList['tests/**/*.rb']
29
+ t.verbose = false
30
+ end
31
+
24
32
  desc "Run a scan for smelly code!"
25
33
  task :reek do |t|
26
34
  `reek --no-color lib > reek.txt`
@@ -0,0 +1,18 @@
1
+ # coding: utf-8
2
+
3
+ #require what ever is being tested here.
4
+
5
+ gem 'minitest'
6
+ require 'minitest/autorun'
7
+ require 'minitest_visible'
8
+
9
+ #Test the testing process.
10
+ class TheThingBeingTestedTester < Minitest::Test
11
+
12
+ #Track mini-test progress.
13
+ include MinitestVisible
14
+
15
+ #Actual tests methods go here
16
+
17
+ end
18
+
@@ -0,0 +1,50 @@
1
+ # coding: utf-8
2
+
3
+ gem 'minitest'
4
+ require 'minitest/autorun'
5
+ require 'minitest_visible'
6
+
7
+ #Test the testing process.
8
+ class PartOneTester < Minitest::Test
9
+
10
+ #Track mini-test progress.
11
+ include MinitestVisible
12
+
13
+ def test_for_one
14
+ assert_equal(1, 1.0)
15
+ end
16
+
17
+ def test_for_two
18
+ assert_equal(2, 2.0)
19
+ end
20
+
21
+ def test_for_three
22
+ assert_equal(3, 3.0)
23
+ end
24
+
25
+ def test_for_four
26
+ assert_equal(4, 4.0)
27
+ end
28
+
29
+ def test_for_five
30
+ assert_equal(5, 5.0)
31
+ end
32
+
33
+ def test_for_six
34
+ assert_equal(6, 6.0)
35
+ end
36
+
37
+ def test_for_seven
38
+ assert_equal(7, 7.0)
39
+ end
40
+
41
+ def test_for_eight
42
+ assert_equal(8, 8.0)
43
+ end
44
+
45
+ def test_for_nine
46
+ assert_equal(9, 9.0)
47
+ end
48
+
49
+ end
50
+
@@ -0,0 +1,50 @@
1
+ # coding: utf-8
2
+
3
+ gem 'minitest'
4
+ require 'minitest/autorun'
5
+ require 'minitest_visible'
6
+
7
+ #Test the testing process.
8
+ class PartThreeTester < Minitest::Test
9
+
10
+ #Track mini-test progress.
11
+ include MinitestVisible
12
+
13
+ def test_for_one
14
+ assert_equal(1, 1.0)
15
+ end
16
+
17
+ def test_for_two
18
+ assert_equal(2, 2.0)
19
+ end
20
+
21
+ def test_for_three
22
+ assert_equal(3, 3.0)
23
+ end
24
+
25
+ def test_for_four
26
+ assert_equal(4, 4.0)
27
+ end
28
+
29
+ def test_for_five
30
+ assert_equal(5, 5.0)
31
+ end
32
+
33
+ def test_for_six
34
+ assert_equal(6, 6.0)
35
+ end
36
+
37
+ def test_for_seven
38
+ assert_equal(7, 7.0)
39
+ end
40
+
41
+ def test_for_eight
42
+ assert_equal(8, 8.0)
43
+ end
44
+
45
+ def test_for_nine
46
+ assert_equal(9, 9.0)
47
+ end
48
+
49
+ end
50
+
@@ -0,0 +1,50 @@
1
+ # coding: utf-8
2
+
3
+ gem 'minitest'
4
+ require 'minitest/autorun'
5
+ require 'minitest_visible'
6
+
7
+ #Test the testing process.
8
+ class PartTwoTester < Minitest::Test
9
+
10
+ #Track mini-test progress.
11
+ include MinitestVisible
12
+
13
+ def test_for_one
14
+ assert_equal(1, 1.0)
15
+ end
16
+
17
+ def test_for_two
18
+ assert_equal(2, 2.0)
19
+ end
20
+
21
+ def test_for_three
22
+ assert_equal(3, 3.0)
23
+ end
24
+
25
+ def test_for_four
26
+ assert_equal(4, 4.0)
27
+ end
28
+
29
+ def test_for_five
30
+ assert_equal(5, 5.0)
31
+ end
32
+
33
+ def test_for_six
34
+ assert_equal(6, 6.0)
35
+ end
36
+
37
+ def test_for_seven
38
+ assert_equal(7, 7.0)
39
+ end
40
+
41
+ def test_for_eight
42
+ assert_equal(8, 8.0)
43
+ end
44
+
45
+ def test_for_nine
46
+ assert_equal(9, 9.0)
47
+ end
48
+
49
+ end
50
+
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest_visible
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Camilleri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-19 00:00:00.000000000 Z
11
+ date: 2021-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.3'
19
+ version: 2.1.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.3'
26
+ version: 2.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ! '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: reek
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.3.8
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.3.8
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rdoc
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 4.0.1
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 4.0.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ! '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ! '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  description: Slightly more visible progress for mini-test.
@@ -87,14 +87,19 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - .gitignore
90
+ - ".gitignore"
91
+ - CODE_OF_CONDUCT.md
91
92
  - Gemfile
92
93
  - LICENSE.txt
93
94
  - README.md
94
- - Rakefile
95
95
  - lib/minitest_visible.rb
96
96
  - lib/minitest_visible/version.rb
97
97
  - minitest_visible.gemspec
98
+ - rakefile.rb
99
+ - template/xyzzy_tests.rb
100
+ - tests/part_one_tests.rb
101
+ - tests/part_three_tests.rb
102
+ - tests/part_two_tests.rb
98
103
  homepage: http://teuthida-technologies.com/
99
104
  licenses:
100
105
  - MIT
@@ -105,19 +110,17 @@ require_paths:
105
110
  - lib
106
111
  required_ruby_version: !ruby/object:Gem::Requirement
107
112
  requirements:
108
- - - ! '>='
113
+ - - ">="
109
114
  - !ruby/object:Gem::Version
110
115
  version: 1.9.3
111
116
  required_rubygems_version: !ruby/object:Gem::Requirement
112
117
  requirements:
113
- - - ! '>='
118
+ - - ">="
114
119
  - !ruby/object:Gem::Version
115
120
  version: '0'
116
121
  requirements: []
117
- rubyforge_project:
118
- rubygems_version: 2.1.4
122
+ rubygems_version: 3.2.17
119
123
  signing_key:
120
124
  specification_version: 4
121
125
  summary: A bit of embellishment for mini-test progress.
122
126
  test_files: []
123
- has_rdoc: