declarative_minitest 0.1.1 → 0.1.2

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
- SHA1:
3
- metadata.gz: 1e375575cad8354689db154b118a05543f11e8c9
4
- data.tar.gz: b0a4934b1181976296d275ad5ad9c59004330c1a
2
+ SHA256:
3
+ metadata.gz: adcf311a99c9b2a86bc135fdf9896b84c27de1ef6112d9167828876809c552cb
4
+ data.tar.gz: 1800f15cde9ce3414979e9e6d86953d63a1f46428adba49aa7ee2619bbbed73d
5
5
  SHA512:
6
- metadata.gz: cb594c787396e5271121d759cad226fc10db700a6f3c9ba890190a2bad540a1eb66000bb1ba1cc2ff114fdd0ff18a02049e5d913870553d4af1318385067f8ab
7
- data.tar.gz: 0fb0a93778211b03902414ce1c06390bc00e13b780847977ca22f39222826c0376d4956fb000f03bddebcfd2ed877f58f56b14130d2695b64391dac0a8f55a19
6
+ metadata.gz: 9b5d0713a0fab12d21119912aac7d40aba6dc49741f8e71315c8bcb57063d956a99e981243113c51651ba81c68338276a5289ea199a132e80d9b6e790f614f53
7
+ data.tar.gz: b216ea011af7ff94f419e37a5c6e1f2a24de8d29d119c1fdc3723345d8cdcfbcddbe136e695ea7cdf093c615e16759c2b6469d8c5c324911731ba882d4642c3a
data/README.md ADDED
@@ -0,0 +1,18 @@
1
+ # Declarative Minitest [![Build Status](https://travis-ci.org/peterzhu2118/declarative_minitest.svg?branch=master)](https://travis-ci.org/peterzhu2118/declarative_minitest) [![Gem Version](https://badge.fury.io/rb/declarative_minitest.svg)](https://badge.fury.io/rb/declarative_minitest)
2
+
3
+ Adds declarative minitest (`setup do`, `test 'the truth' do`, and `teardown do`) syntax from Rails-flavoured minitest to the original minitest.
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ $ gem install declarative_minitest
9
+ ```
10
+ or add to your `Gemfile`:
11
+ ```
12
+ gem 'declarative_minitest', '~> 0.1.1'
13
+ ```
14
+
15
+ ## How to use
16
+
17
+ Add the line `require 'minitest/declarative'` after `require 'minitest/autorun'` in
18
+ either `test_helper.rb` or in the individual tests that you want declarative syntax.
@@ -13,6 +13,7 @@ module Minitest
13
13
  test_name = "test_#{name.gsub(/\s+/, '_')}".to_sym
14
14
  defined = method_defined? test_name
15
15
  raise "#{test_name} is already defined in #{self}" if defined
16
+
16
17
  if block_given?
17
18
  define_method(test_name, &block)
18
19
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: declarative_minitest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Zhu
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-09 00:00:00.000000000 Z
11
+ date: 2022-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -32,14 +32,14 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - MIT-LICENSE
35
- - Rakefile
35
+ - README.md
36
36
  - lib/declarative_minitest.rb
37
37
  - lib/minitest/declarative.rb
38
38
  homepage: https://github.com/peterzhu2118/declarative_minitest
39
39
  licenses:
40
40
  - MIT
41
41
  metadata: {}
42
- post_install_message:
42
+ post_install_message:
43
43
  rdoc_options: []
44
44
  require_paths:
45
45
  - lib
@@ -54,9 +54,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  requirements: []
57
- rubyforge_project:
58
- rubygems_version: 2.5.2.3
59
- signing_key:
57
+ rubygems_version: 3.3.7
58
+ signing_key:
60
59
  specification_version: 4
61
60
  summary: Ports Rails declarative minitest into regular minitest
62
61
  test_files: []
data/Rakefile DELETED
@@ -1,27 +0,0 @@
1
- begin
2
- require 'bundler/setup'
3
- rescue LoadError
4
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
- end
6
-
7
- require 'rdoc/task'
8
-
9
- RDoc::Task.new(:rdoc) do |rdoc|
10
- rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'declarative_minitest'
12
- rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.md')
14
- rdoc.rdoc_files.include('lib/**/*.rb')
15
- end
16
-
17
- require 'bundler/gem_tasks'
18
-
19
- require 'rake/testtask'
20
-
21
- Rake::TestTask.new(:test) do |t|
22
- t.libs << 'test'
23
- t.pattern = 'test/**/*_test.rb'
24
- t.verbose = false
25
- end
26
-
27
- task default: :test