minitest-sugar 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -18,6 +18,18 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
+ Allow to create tests in a more human readable form:
22
+
23
+ ```
24
+ class TruthTest < MiniTest::Unit::TestCase
25
+ extend MiniTest::Sugar
26
+
27
+ test 'assert the truth' do
28
+ assert true
29
+ end
30
+ end
31
+ ```
32
+
21
33
  See [rubydoc](http://rubydoc.info/github/frodsan/minitest-sugar/master/frames).
22
34
 
23
35
  ## Contributing
@@ -26,4 +38,4 @@ See [rubydoc](http://rubydoc.info/github/frodsan/minitest-sugar/master/frames).
26
38
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
39
  3. Commit your changes (`git commit -am 'Added some feature'`)
28
40
  4. Push to the branch (`git push origin my-new-feature`)
29
- 5. Create new Pull Request
41
+ 5. Create new Pull Request
@@ -1,4 +1,4 @@
1
- module Minitest
1
+ module MiniTest
2
2
  module Sugar
3
3
  # Allow to create tests in a more human readable form.
4
4
  #
@@ -6,21 +6,21 @@ module Minitest
6
6
  # extend MiniTest::Sugar
7
7
  #
8
8
  # test 'assert the truth' do
9
- # assert false
9
+ # assert true
10
10
  # end
11
11
  # end
12
- def test(name, &block)
12
+ def test name, &block
13
13
  test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym
14
14
  defined = instance_method(test_name) rescue false
15
15
  raise "#{test_name} is already defined in #{self}" if defined
16
16
 
17
17
  if block_given?
18
- define_method(test_name, &block)
18
+ define_method test_name, &block
19
19
  else
20
- define_method(test_name) do
21
- flunk "No implementation provided for #{name}"
20
+ define_method test_name do
21
+ flunk 'No implementation provided for #{name}'
22
22
  end
23
23
  end
24
24
  end
25
25
  end
26
- end
26
+ end
@@ -1,5 +1,5 @@
1
- module Minitest
1
+ module MiniTest
2
2
  module Sugar
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
12
12
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
13
13
  gem.name = 'minitest-sugar'
14
14
  gem.require_paths = ['lib']
15
- gem.version = Minitest::Sugar::VERSION
15
+ gem.version = MiniTest::Sugar::VERSION
16
16
 
17
17
  gem.add_dependency 'minitest', '>= 3.1.0'
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-sugar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: