minitest-emoji 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/.autotest ADDED
@@ -0,0 +1,8 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ Autotest.add_hook :initialize do |at|
6
+ at.testlib = 'minitest/autorun'
7
+ at.find_directories = ARGV unless ARGV.empty?
8
+ end
data/.gemtest ADDED
File without changes
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,6 @@
1
+ === 1.0.0 / 2011-11-22
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday!
6
+
data/Manifest.txt ADDED
@@ -0,0 +1,7 @@
1
+ .autotest
2
+ CHANGELOG.rdoc
3
+ Manifest.txt
4
+ README.rdoc
5
+ Rakefile
6
+ lib/minitest/emoji.rb
7
+ test/test_minitest_emoji.rb
data/README.rdoc ADDED
@@ -0,0 +1,69 @@
1
+ = minitest-emoji
2
+
3
+ * http://github.com/tenderlove/minitest-emoji
4
+
5
+ == DESCRIPTION:
6
+
7
+ Print out emoji for your test passes, fails, and skips
8
+
9
+ == FEATURES/PROBLEMS:
10
+
11
+ * See description
12
+
13
+ == SYNOPSIS:
14
+
15
+ require 'minitest/autorun'
16
+ require 'minitest/emoji'
17
+
18
+ describe 'my amazing tests' do
19
+ # generate many hearts!
20
+ 50.times do |i|
21
+ it "must #{i}" do
22
+ 100.must_equal 100
23
+ end
24
+ end
25
+
26
+ # generate some poops!
27
+ 2.times do |i|
28
+ it "compares #{i} to #{i + 1}" do
29
+ i.must_equal i + 1
30
+ end
31
+ end
32
+
33
+ it 'skips things!!' do
34
+ skip "don't care!"
35
+ end
36
+ end
37
+
38
+ == REQUIREMENTS:
39
+
40
+ * minitest
41
+
42
+ == INSTALL:
43
+
44
+ * gem install minitest-emoji
45
+
46
+ == LICENSE:
47
+
48
+ (The MIT License)
49
+
50
+ Copyright (c) 2011 Aaron Patterson
51
+
52
+ Permission is hereby granted, free of charge, to any person obtaining
53
+ a copy of this software and associated documentation files (the
54
+ 'Software'), to deal in the Software without restriction, including
55
+ without limitation the rights to use, copy, modify, merge, publish,
56
+ distribute, sublicense, and/or sell copies of the Software, and to
57
+ permit persons to whom the Software is furnished to do so, subject to
58
+ the following conditions:
59
+
60
+ The above copyright notice and this permission notice shall be
61
+ included in all copies or substantial portions of the Software.
62
+
63
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
64
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
65
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
66
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
67
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
68
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
69
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,18 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ Hoe.plugins.delete :rubyforge
7
+ Hoe.plugin :minitest
8
+ Hoe.plugin :gemspec # `gem install hoe-gemspec`
9
+ Hoe.plugin :git # `gem install hoe-git`
10
+
11
+ Hoe.spec 'minitest-emoji' do
12
+ developer('Aaron Patterson', 'aaron@tenderlovemaking.com')
13
+ self.readme_file = 'README.rdoc'
14
+ self.history_file = 'CHANGELOG.rdoc'
15
+ self.extra_rdoc_files = FileList['*.rdoc']
16
+ end
17
+
18
+ # vim: syntax=ruby
@@ -0,0 +1,30 @@
1
+ module MiniTest
2
+ class Emoji
3
+ VERSION = '1.0.0'
4
+
5
+ DEFAULT = {
6
+ '.' => "\u{1f497} ",
7
+ 'E' => "\u{1f525} ",
8
+ 'F' => "\u{1f4a9} ",
9
+ 'S' => "\u{1f633} ",
10
+ }
11
+
12
+ attr_reader :io, :chars
13
+
14
+ def initialize io, chars = DEFAULT
15
+ @io = io
16
+ @chars = DEFAULT
17
+ end
18
+
19
+ def print o
20
+ io.print(chars[o] || o)
21
+ end
22
+
23
+ def method_missing msg, *args
24
+ return super unless io.respond_to? msg
25
+ io.send(msg, *args)
26
+ end
27
+ end
28
+ end
29
+
30
+ MiniTest::Unit.output = MiniTest::Emoji.new(MiniTest::Unit.output)
@@ -0,0 +1,22 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/emoji'
3
+
4
+ describe 'my amazing tests' do
5
+ # generate many hearts!
6
+ 50.times do |i|
7
+ it "must #{i}" do
8
+ 100.must_equal 100
9
+ end
10
+ end
11
+
12
+ # generate some poops!
13
+ 2.times do |i|
14
+ it "compares #{i} to #{i + 1}" do
15
+ i.must_equal i + 1
16
+ end
17
+ end
18
+
19
+ it 'skips things!!' do
20
+ skip "don't care!"
21
+ end
22
+ end
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: minitest-emoji
3
+ version: !ruby/object:Gem::Version
4
+ version: !binary |-
5
+ MS4wLjA=
6
+ prerelease:
7
+ platform: ruby
8
+ authors:
9
+ - Aaron Patterson
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2011-11-23 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: minitest
17
+ requirement: &70187169186160 !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ~>
21
+ - !ruby/object:Gem::Version
22
+ version: '2.8'
23
+ type: :development
24
+ prerelease: false
25
+ version_requirements: *70187169186160
26
+ - !ruby/object:Gem::Dependency
27
+ name: hoe
28
+ requirement: &70187169185700 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '2.12'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: *70187169185700
37
+ description: !binary |-
38
+ UHJpbnQgb3V0IGVtb2ppIGZvciB5b3VyIHRlc3QgcGFzc2VzLCBmYWlscywg
39
+ YW5kIHNraXBz
40
+ email:
41
+ - aaron@tenderlovemaking.com
42
+ executables: []
43
+ extensions: []
44
+ extra_rdoc_files:
45
+ - !binary |-
46
+ TWFuaWZlc3QudHh0
47
+ - CHANGELOG.rdoc
48
+ - README.rdoc
49
+ files:
50
+ - !binary |-
51
+ LmF1dG90ZXN0
52
+ - !binary |-
53
+ Q0hBTkdFTE9HLnJkb2M=
54
+ - !binary |-
55
+ TWFuaWZlc3QudHh0
56
+ - !binary |-
57
+ UkVBRE1FLnJkb2M=
58
+ - !binary |-
59
+ UmFrZWZpbGU=
60
+ - !binary |-
61
+ bGliL21pbml0ZXN0L2Vtb2ppLnJi
62
+ - !binary |-
63
+ dGVzdC90ZXN0X21pbml0ZXN0X2Vtb2ppLnJi
64
+ - .gemtest
65
+ homepage: !binary |-
66
+ aHR0cDovL2dpdGh1Yi5jb20vdGVuZGVybG92ZS9taW5pdGVzdC1lbW9qaQ==
67
+ licenses: []
68
+ post_install_message:
69
+ rdoc_options:
70
+ - --main
71
+ - README.rdoc
72
+ require_paths:
73
+ - lib
74
+ required_ruby_version: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ required_rubygems_version: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ requirements: []
87
+ rubyforge_project: minitest-emoji
88
+ rubygems_version: 1.8.11
89
+ signing_key:
90
+ specification_version: 3
91
+ summary: !binary |-
92
+ UHJpbnQgb3V0IGVtb2ppIGZvciB5b3VyIHRlc3QgcGFzc2VzLCBmYWlscywg
93
+ YW5kIHNraXBz
94
+ test_files:
95
+ - test/test_minitest_emoji.rb