petitest 0.3.0 → 0.3.1

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
  SHA1:
3
- metadata.gz: 2fa31c282318eafafb3924faa1b0d8896b8d7c3a
4
- data.tar.gz: 147f137bf109acfb85ad8e6a36f7ce1c07605b25
3
+ metadata.gz: 63ae228bba34d572d8d3c291464806317c2684e2
4
+ data.tar.gz: 1849b218ea94042e537df22b7ec8eaeec678f68b
5
5
  SHA512:
6
- metadata.gz: 3767d10b75eb06fc7943fb46aeee35a14daf2870eb55aa7c33268ab3345e32e1a50a4ef36548cbc67144ab683e2a62ac0b7a263ddf27f397b3e5f4d2380bbf39
7
- data.tar.gz: 2f7ecabd8e1fcb9000818cbf2c6062f160149fbe04599f4cd20f365dc5815f9b696c897424966343fbe0037727863a5e52f5e5ba161a038422ffe43e68d94dcf
6
+ metadata.gz: d8b4f90cbb58fe9f89b5e1ce503fb05b49d8965daebcb37029add269143907318445943abf3cdce92e54bbaa120625cd7b57263a26695757131119f7accada82
7
+ data.tar.gz: c0fd58820db206827665e315004f33ad924e00829d9291fc54bb391d95b3f1dceac6157518156e3f5969471837b904e8b4906f518085f5d93155f30e938a1e9a
@@ -1,3 +1,8 @@
1
+ ## v0.3.1
2
+
3
+ - Remove `Petitest::DSL`
4
+ - Remove `Petitest::Test.full_description`
5
+
1
6
  ## v0.3.0
2
7
 
3
8
  - Add `Petitest::DSL`
data/README.md CHANGED
@@ -90,37 +90,6 @@ assert { foo }
90
90
 
91
91
  If you need more assertions, use plugins like [patitest-assertions](https://github.com/petitest/petitest-assertions).
92
92
 
93
- ## DSL
94
-
95
- If you want to use `#desc`, `#test` and `#sub_test` DSL, extend `Petitest::DSL` into your test class.
96
-
97
- ```ruby
98
- class ExampleTest < Petitest::Test
99
- extend ::Petitest::DSL
100
-
101
- test "foo" do
102
- assert { foo }
103
- end
104
-
105
- desc "fuba"
106
- def test_fuba
107
- assert { fuba }
108
- end
109
-
110
- sub_test "bar" do
111
- test "baz" do
112
- assert { baz }
113
- end
114
-
115
- sub_test "boo" do
116
- test "boz" do
117
- assert { boz }
118
- end
119
- end
120
- end
121
- end
122
- ```
123
-
124
93
  ## Configuration
125
94
 
126
95
  ### backtrace_filters
@@ -197,6 +166,7 @@ These subscribers are provided by default:
197
166
  Here are some official plugins for Petitest:
198
167
 
199
168
  - https://github.com/petitest/petitest-assertions
169
+ - https://github.com/petitest/petitest-dsl
200
170
  - https://github.com/petitest/petitest-power_assert
201
171
  - https://github.com/petitest/petitest-tap
202
172
 
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
2
+ require "rake/testtask"
3
3
 
4
- RSpec::Core::RakeTask.new(:spec)
4
+ Rake::TestTask.new do |task|
5
+ task.pattern = "test/**/*_test.rb"
6
+ end
5
7
 
6
- task :default => :spec
8
+ task default: :test
@@ -1,7 +1,6 @@
1
1
  require "petitest/assertion_failure_error"
2
2
  require "petitest/assertion_skip_error"
3
3
  require "petitest/configuration"
4
- require "petitest/dsl"
5
4
  require "petitest/subscriber_concerns/output_concern"
6
5
  require "petitest/subscriber_concerns/time_concern"
7
6
  require "petitest/subscribers/base_subscriber"
@@ -29,11 +29,6 @@ module Petitest
29
29
  ::Petitest::TestGroup.new(test_class: self)
30
30
  end
31
31
 
32
- # @return [String, nil]
33
- def full_description
34
- test_ancestors.reverse.map(&:description).join(" ")
35
- end
36
-
37
32
  # @note Override
38
33
  def inherited(child)
39
34
  super
@@ -1,3 +1,3 @@
1
1
  module Petitest
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: petitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura
@@ -71,7 +71,6 @@ files:
71
71
  - lib/petitest/assertion_skip_error.rb
72
72
  - lib/petitest/autorun.rb
73
73
  - lib/petitest/configuration.rb
74
- - lib/petitest/dsl.rb
75
74
  - lib/petitest/subscriber_concerns/output_concern.rb
76
75
  - lib/petitest/subscriber_concerns/time_concern.rb
77
76
  - lib/petitest/subscribers/base_subscriber.rb
@@ -1,27 +0,0 @@
1
- module Petitest
2
- module DSL
3
- # @param current_description [String]
4
- def desc(current_description)
5
- self.current_description = current_description
6
- end
7
-
8
- # @param description [String]
9
- # @param metadata [Hash{Symbol => Object}]
10
- def sub_test(description, metadata = {}, &block)
11
- child = ::Class.new(self)
12
- child.description = description
13
- child.metadata = self.metadata.merge(metadata)
14
- child.undefine_test_methods
15
- child.class_eval(&block)
16
- child
17
- end
18
-
19
- # @param description [String]
20
- # @param metadata [Hash{Symbol => Object}]
21
- def test(description, metadata = {}, &block)
22
- block ||= -> { skip }
23
- desc(description)
24
- define_method("test_#{description}", &block)
25
- end
26
- end
27
- end