shindo 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +23 -26
- data/Rakefile +1 -10
- data/lib/shindo/bin.rb +1 -1
- data/lib/shindo/rake.rb +1 -1
- data/lib/shindo.rb +1 -1
- data/shindo.gemspec +3 -4
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e14ff3e7068eef88b7cc53cd51132d6bafcbbef3fa3bdd46c65ef679f47fc50
|
4
|
+
data.tar.gz: 5a0262b11d3ae34ac5009ecb30a06d4179806824b790a71dfc134b93adc876da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 675612ee62ec7523a4ac2227d6a7ead5b30836f6dafc25183914e64cfc9694906860f79b84dfe8c45fe6a1f053487909918b5871b4ff91b7e15565708df1b2b5
|
7
|
+
data.tar.gz: 0f77812ee56fa9af995bcf6978716f970b612fc15a4fa2bf1f76ab263b8a51fdc797c4e1535a9ad5b4c22d11daabc34914771bd2af7cd224ab69f5e57cc5aa78
|
data/README.rdoc
CHANGED
@@ -27,31 +27,28 @@ For one off simple tests like this you can also chain the calls like this:
|
|
27
27
|
|
28
28
|
You can also override the default descriptions:
|
29
29
|
|
30
|
-
Shindo.tests('
|
31
|
-
returns('
|
32
|
-
raises(StandardError, 'raises
|
30
|
+
Shindo.tests('example/bar') do
|
31
|
+
returns('default description', 'overriding description: non-default description') { 'default description' }
|
32
|
+
raises(StandardError, 'overriding description: raises when true') { raise StandardError if true }
|
33
33
|
end
|
34
34
|
|
35
35
|
Or nest things inside tests blocks:
|
36
36
|
Shindo.tests do
|
37
|
-
tests('
|
38
|
-
returns(
|
39
|
-
returns(
|
40
|
-
|
41
|
-
tests('raises') do
|
42
|
-
raises(StandardError, 'raises StandardError when baz') { raise StandardError }
|
43
|
-
raises(StandardError, 'raises StandardError when qux') { raise StandardError }
|
37
|
+
tests('examples') do
|
38
|
+
returns(true, 'returns true description') { true }
|
39
|
+
returns(false, 'returns false description') { false }
|
40
|
+
raises(StandardError, 'raises StandardError description') { raise StandardError }
|
44
41
|
end
|
45
42
|
end
|
46
43
|
|
47
|
-
Then, if you want to get
|
44
|
+
Then, if you want to get extra fancy you can tag tests, to help narrow down which ones to run
|
48
45
|
|
49
|
-
Shindo.tests('tests for
|
50
|
-
test(
|
46
|
+
Shindo.tests('tests for true', 'true') do
|
47
|
+
test(true) { true }
|
51
48
|
end
|
52
49
|
|
53
|
-
Shindo.tests('tests for
|
54
|
-
test(
|
50
|
+
Shindo.tests('tests for false', 'false') do
|
51
|
+
test(false) { false }
|
55
52
|
end
|
56
53
|
|
57
54
|
Note: you'll have to supply a non-default description first, and then follow up with tags.
|
@@ -61,11 +58,11 @@ Note: you'll have to supply a non-default description first, and then follow up
|
|
61
58
|
Tests get evaluated in the file just like you see it so you can add setup and teardown easily:
|
62
59
|
|
63
60
|
Shindo.tests do
|
64
|
-
|
65
|
-
tests('
|
61
|
+
bool = true # setup
|
62
|
+
tests('bool').returns(true) { bool }
|
66
63
|
|
67
|
-
|
68
|
-
tests('
|
64
|
+
bool = false # cleanup after last
|
65
|
+
tests('bool').returns(false) { bool }
|
69
66
|
|
70
67
|
foo = nil # teardown
|
71
68
|
end
|
@@ -94,17 +91,17 @@ You can also give directories and it will run all files ending in _tests.rb and
|
|
94
91
|
|
95
92
|
shindo some_test_directory
|
96
93
|
|
97
|
-
That leaves tags, which use +/-. So run just tests with the '
|
94
|
+
That leaves tags, which use +/-. So run just tests with the 'true' tag:
|
98
95
|
|
99
|
-
shindo some_test_directory +
|
96
|
+
shindo some_test_directory +true
|
100
97
|
|
101
|
-
Or those without the '
|
98
|
+
Or those without the 'false' tag:
|
102
99
|
|
103
|
-
shindo some_test_directory -
|
100
|
+
shindo some_test_directory -false
|
104
101
|
|
105
|
-
Or combine to run everything with a
|
102
|
+
Or combine to run everything with a 'true' tag, but no 'false' tag
|
106
103
|
|
107
|
-
shindo some_test_directory +
|
104
|
+
shindo some_test_directory +true -false
|
108
105
|
|
109
106
|
If you are running in a non-interactive mode, or one where speed matters (i.e. continuous integration), you can run shindo with (n)o (t)race and much quieter output. It takes all the same arguments, but uses the shindont bin file.
|
110
107
|
|
@@ -118,7 +115,7 @@ When tests fail you'll get lots of options to help you debug the problem, just e
|
|
118
115
|
|
119
116
|
(The MIT License)
|
120
117
|
|
121
|
-
Copyright (c)
|
118
|
+
Copyright (c) 2021 {geemus (Wesley Beary)}[http://github.com/geemus]
|
122
119
|
|
123
120
|
Permission is hereby granted, free of charge, to any person obtaining
|
124
121
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -45,7 +45,7 @@ end
|
|
45
45
|
|
46
46
|
require File.join(File.dirname(__FILE__), 'lib', 'shindo', 'rake')
|
47
47
|
Shindo::Rake.new
|
48
|
-
task :default => :
|
48
|
+
task :default => :tests
|
49
49
|
|
50
50
|
desc "Generate RCov test coverage and open in your browser"
|
51
51
|
task :coverage do
|
@@ -140,12 +140,3 @@ task :validate do
|
|
140
140
|
exit!
|
141
141
|
end
|
142
142
|
end
|
143
|
-
|
144
|
-
task :shindo_tests do
|
145
|
-
system "shindo -build_error"
|
146
|
-
fail "Tests excluding build error should pass" unless $? == 0
|
147
|
-
|
148
|
-
puts "2"
|
149
|
-
system "shindo +build_error"
|
150
|
-
fail "The build_error test should fail" unless $? != 0
|
151
|
-
end
|
data/lib/shindo/bin.rb
CHANGED
data/lib/shindo/rake.rb
CHANGED
data/lib/shindo.rb
CHANGED
data/shindo.gemspec
CHANGED
@@ -13,9 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'shindo'
|
16
|
-
s.version = '0.3.
|
17
|
-
s.date = '
|
18
|
-
s.rubyforge_project = 'shindo'
|
16
|
+
s.version = '0.3.11'
|
17
|
+
s.date = '2024-05-03'
|
19
18
|
|
20
19
|
## Make sure your summary is short. The description may be as long
|
21
20
|
## as you like.
|
@@ -28,6 +27,7 @@ Gem::Specification.new do |s|
|
|
28
27
|
s.authors = ["geemus (Wesley Beary)"]
|
29
28
|
s.email = 'geemus@gmail.com'
|
30
29
|
s.homepage = 'http://github.com/geemus/shindo'
|
30
|
+
s.license = 'MIT'
|
31
31
|
|
32
32
|
## This gets added to the $LOAD_PATH so that 'lib/NAME.rb' can be required as
|
33
33
|
## require 'NAME.rb' or'/lib/NAME/file.rb' can be as require 'NAME/file.rb'
|
@@ -39,7 +39,6 @@ Gem::Specification.new do |s|
|
|
39
39
|
|
40
40
|
## If your gem includes any executables, list them here.
|
41
41
|
s.executables = ['shindo', 'shindont']
|
42
|
-
s.default_executable = 'shindo'
|
43
42
|
|
44
43
|
## Specify any RDoc options here. You'll want to add your README and
|
45
44
|
## LICENSE files to the extra_rdoc_files list.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shindo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- geemus (Wesley Beary)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: formatador
|
@@ -89,7 +89,8 @@ files:
|
|
89
89
|
- tests/tag_tests.rb
|
90
90
|
- tests/tests_helper.rb
|
91
91
|
homepage: http://github.com/geemus/shindo
|
92
|
-
licenses:
|
92
|
+
licenses:
|
93
|
+
- MIT
|
93
94
|
metadata: {}
|
94
95
|
post_install_message:
|
95
96
|
rdoc_options:
|
@@ -107,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
108
|
- !ruby/object:Gem::Version
|
108
109
|
version: '0'
|
109
110
|
requirements: []
|
110
|
-
rubygems_version: 3.
|
111
|
+
rubygems_version: 3.4.22
|
111
112
|
signing_key:
|
112
113
|
specification_version: 2
|
113
114
|
summary: Simple depth first Ruby testing.
|