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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 888bcf6781e3e4d16d3c58277eb19c992ee939a57e38aea00fe82cf0c7d0890c
4
- data.tar.gz: cdfe64692891230c776c77b3bdf19ddd132c6186a55f082bfb2d504f620c2f90
3
+ metadata.gz: 0e14ff3e7068eef88b7cc53cd51132d6bafcbbef3fa3bdd46c65ef679f47fc50
4
+ data.tar.gz: 5a0262b11d3ae34ac5009ecb30a06d4179806824b790a71dfc134b93adc876da
5
5
  SHA512:
6
- metadata.gz: b97f6871025c5be6baab36c4f957839badf929a2665141abd637c356945fc0b5047520385b621e9be929866277e838dd65a0bc5ca3cca4c3d3035c877c1d054a
7
- data.tar.gz: 38dd3fc1958d55ddceb266e0b991142f1e7dc20d05897318e97093614cf2b2bd854cd2f11bd6f50845484e98788c6f66f8321913aa2d21e3f2291199a8a9c1f6
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('foo/bar') do
31
- returns('foo', 'returns foo when bar') { 'foo' }
32
- raises(StandardError, 'raises StandardError when baz') { raise StandardError }
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('returns') do
38
- returns('foo', 'returns foo when bar') { 'foo' }
39
- returns('bar', 'returns bar when baz') { 'bar' }
40
- end
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 real fancy you can also tag your tests, to help narrow down which ones to run
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 foo', 'foo') do
50
- test('foo') { true }
46
+ Shindo.tests('tests for true', 'true') do
47
+ test(true) { true }
51
48
  end
52
49
 
53
- Shindo.tests('tests for bar', 'bar') do
54
- test('bar') { true }
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
- foo = 'bar' # setup
65
- tests('foo').returns('bar') { foo }
61
+ bool = true # setup
62
+ tests('bool').returns(true) { bool }
66
63
 
67
- foo = 'baz' # cleanup after last
68
- tests('foo').returns('baz') { foo }
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 'foo' tag:
94
+ That leaves tags, which use +/-. So run just tests with the 'true' tag:
98
95
 
99
- shindo some_test_directory +foo
96
+ shindo some_test_directory +true
100
97
 
101
- Or those without the 'bar' tag:
98
+ Or those without the 'false' tag:
102
99
 
103
- shindo some_test_directory -bar
100
+ shindo some_test_directory -false
104
101
 
105
- Or combine to run everything with a foo tag, but no bar tag
102
+ Or combine to run everything with a 'true' tag, but no 'false' tag
106
103
 
107
- shindo some_test_directory +foo -bar
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) 2009 {geemus (Wesley Beary)}[http://github.com/geemus]
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 => :shindo_tests
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
@@ -29,7 +29,7 @@ for argument in ARGV
29
29
  if File.directory?(path)
30
30
  tests ||= []
31
31
  tests |= Dir.glob(File.join(path, '**', '*tests.rb'))
32
- elsif File.exists?(path)
32
+ elsif File.exist?(path)
33
33
  tests ||= []
34
34
  tests << path
35
35
  else
data/lib/shindo/rake.rb CHANGED
@@ -7,7 +7,7 @@ module Shindo
7
7
  def initialize
8
8
  desc "Run shindo tests"
9
9
  task :tests do
10
- system 'shindo'
10
+ ruby '-S', 'shindo'
11
11
  fail if $? != 0
12
12
  end
13
13
  end
data/lib/shindo.rb CHANGED
@@ -5,7 +5,7 @@ module Shindo
5
5
  class Pending < StandardError; end
6
6
 
7
7
  unless const_defined?(:VERSION)
8
- VERSION = '0.3.10'
8
+ VERSION = '0.3.11'
9
9
  end
10
10
 
11
11
  def self.tests(description = nil, tags = [], &block)
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.10'
17
- s.date = '2021-03-01'
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.10
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: 2021-03-01 00:00:00.000000000 Z
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.1.2
111
+ rubygems_version: 3.4.22
111
112
  signing_key:
112
113
  specification_version: 2
113
114
  summary: Simple depth first Ruby testing.