emoji-test-love 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg/*
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require rspec/emoji.rb --format RSpec::Emoji
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/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in emoji_test_love.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 coreyhaines
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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.md ADDED
@@ -0,0 +1,84 @@
1
+ = Emoji Test Love
2
+
3
+ * http://github.com/coreyhaines/emoji-test-love
4
+
5
+ == DESCRIPTION:
6
+
7
+ Print out emoji for your test passes, fails, and skips
8
+
9
+ This is entirely based on [Tenderlove's](https://github.com/tenderlove) most awesome [minitest-emoji](https://github.com/tenderlove/minitest-emoji)
10
+
11
+ In fact, the minitest code is actually just copied from there. Truth!
12
+
13
+ == FEATURES/PROBLEMS:
14
+
15
+ * See description
16
+
17
+ == SYNOPSIS:
18
+
19
+ Do you use minitest? You are in luck! Here's an example.
20
+
21
+ ```
22
+ require 'minitest/autorun'
23
+ require 'minitest/emoji'
24
+
25
+ describe 'my amazing tests' do
26
+ # generate many hearts!
27
+ 50.times do |i|
28
+ it "must #{i}" do
29
+ 100.must_equal 100
30
+ end
31
+ end
32
+
33
+ # generate some poops!
34
+ 2.times do |i|
35
+ it "compares #{i} to #{i + 1}" do
36
+ i.must_equal i + 1
37
+ end
38
+ end
39
+
40
+ it 'skips things!!' do
41
+ skip "don't care!"
42
+ end
43
+ end
44
+ ```
45
+
46
+ if you use RSpec, then we have a custom formatter for you. Here's a sample spec file
47
+
48
+ ```
49
+ describe 'my amazing tests' do
50
+ # generate many hearts!
51
+ 50.times do |i|
52
+ it "must #{i}" do
53
+ 100.should == 100
54
+ end
55
+ end
56
+
57
+ # generate some poops!
58
+ 2.times do |i|
59
+ it "compares #{i} to #{i + 1}" do
60
+ i.should == i + 1
61
+ end
62
+ end
63
+
64
+ it 'skips things!!' do
65
+ pending "don't care!"
66
+ end
67
+ end
68
+ ```
69
+
70
+ Then just rock out with our formatter
71
+ ```
72
+ rspec --format RSpec::Emoji
73
+ ```
74
+
75
+ == REQUIREMENTS:
76
+
77
+ * minitest
78
+ -or-
79
+ * rspec
80
+
81
+ == INSTALL:
82
+
83
+ * gem install emoji-test-love
84
+
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,18 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = "emoji-test-love"
7
+ gem.version = "1.0.1"
8
+ gem.authors = ["coreyhaines"]
9
+ gem.email = ["coreyhaines@gmail.com"]
10
+ gem.description = %q{Make your test runs happier with emoji love. We don't mind if you use minitest or rspec. Love is Love! Based entirely on Aaron Patterson's awesome minitest-emoji.}
11
+ gem.summary = %q{Make your test runs happier with emoji love}
12
+ gem.homepage = "https://github.com/coreyhaines/emoji-test-love"
13
+
14
+ gem.files = `git ls-files`.split($/)
15
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
16
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
+ gem.require_paths = ["lib"]
18
+ end
@@ -0,0 +1,30 @@
1
+ module MiniTest
2
+ class Emoji
3
+ VERSION = '1.0.0'
4
+
5
+ DEFAULT = {
6
+ '.' => "\u{1F49A} ",
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,29 @@
1
+ require "rspec/core/formatters/base_text_formatter"
2
+ module RSpec
3
+ class Emoji < RSpec::Core::Formatters::BaseTextFormatter
4
+ VERSION = '1.0.0'
5
+
6
+ DEFAULT = {
7
+ '.' => "\u{1F49A} ",
8
+ 'E' => "\u{1f525} ",
9
+ 'F' => "\u{1f4a9} ",
10
+ 'S' => "\u{1f633} ",
11
+ }
12
+
13
+ def example_passed(example)
14
+ super
15
+ output.print DEFAULT['.']
16
+ end
17
+
18
+ def example_failed(example)
19
+ super
20
+ output.print DEFAULT['F']
21
+ end
22
+
23
+ def example_pending(example)
24
+ super
25
+ output.print DEFAULT['S']
26
+ end
27
+ end
28
+ end
29
+
@@ -0,0 +1,19 @@
1
+ describe 'my amazing tests' do
2
+ # generate many hearts!
3
+ 50.times do |i|
4
+ it "must #{i}" do
5
+ 100.should == 100
6
+ end
7
+ end
8
+
9
+ # generate some poops!
10
+ 2.times do |i|
11
+ it "compares #{i} to #{i + 1}" do
12
+ i.should == i + 1
13
+ end
14
+ end
15
+
16
+ it 'skips things!!' do
17
+ pending "don't care!"
18
+ end
19
+ end
@@ -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,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: emoji-test-love
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - coreyhaines
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-03-01 00:00:00.000000000 Z
13
+ dependencies: []
14
+ description: Make your test runs happier with emoji love. We don't mind if you use
15
+ minitest or rspec. Love is Love! Based entirely on Aaron Patterson's awesome minitest-emoji.
16
+ email:
17
+ - coreyhaines@gmail.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - .autotest
23
+ - .gitignore
24
+ - .rspec
25
+ - CHANGELOG.rdoc
26
+ - Gemfile
27
+ - LICENSE.txt
28
+ - Manifest.txt
29
+ - README.md
30
+ - Rakefile
31
+ - emoji-test-love.gemspec
32
+ - lib/minitest/emoji.rb
33
+ - lib/rspec/emoji.rb
34
+ - spec/rspec_emoji_spec.rb
35
+ - test/test_minitest_emoji.rb
36
+ homepage: https://github.com/coreyhaines/emoji-test-love
37
+ licenses: []
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ requirements: []
55
+ rubyforge_project:
56
+ rubygems_version: 1.8.24
57
+ signing_key:
58
+ specification_version: 3
59
+ summary: Make your test runs happier with emoji love
60
+ test_files:
61
+ - spec/rspec_emoji_spec.rb
62
+ - test/test_minitest_emoji.rb