Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit 700fd580190e9d3966799334a6063394f25647d7 @tenderlove committed Nov 23, 2011
Showing with 160 additions and 0 deletions.
  1. +8 −0 .autotest
  2. +6 −0 CHANGELOG.rdoc
  3. +7 −0 Manifest.txt
  4. +69 −0 README.rdoc
  5. +18 −0 Rakefile
  6. +30 −0 lib/minitest/emoji.rb
  7. +22 −0 test/test_minitest_emoji.rb
@@ -0,0 +1,8 @@
+# -*- ruby -*-
+
+require 'autotest/restart'
+
+Autotest.add_hook :initialize do |at|
+ at.testlib = 'minitest/autorun'
+ at.find_directories = ARGV unless ARGV.empty?
+end
@@ -0,0 +1,6 @@
+=== 1.0.0 / 2011-11-22
+
+* 1 major enhancement
+
+ * Birthday!
+
@@ -0,0 +1,7 @@
+.autotest
+CHANGELOG.rdoc
+Manifest.txt
+README.rdoc
+Rakefile
+lib/minitest/emoji.rb
+test/test_minitest_emoji.rb
@@ -0,0 +1,69 @@
+= minitest-emoji
+
+* http://github.com/tenderlove/minitest-emoji
+
+== DESCRIPTION:
+
+Print out emoji for your test passes, fails, and skips
+
+== FEATURES/PROBLEMS:
+
+* See description
+
+== SYNOPSIS:
+
+ require 'minitest/autorun'
+ require 'minitest/emoji'
+
+ describe 'my amazing tests' do
+ # generate many hearts!
+ 50.times do |i|
+ it "must #{i}" do
+ 100.must_equal 100
+ end
+ end
+
+ # generate some poops!
+ 2.times do |i|
+ it "compares #{i} to #{i + 1}" do
+ i.must_equal i + 1
+ end
+ end
+
+ it 'skips things!!' do
+ skip "don't care!"
+ end
+ end
+
+== REQUIREMENTS:
+
+* minitest
+
+== INSTALL:
+
+* gem install minitest-emoji
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) 2011 Aaron Patterson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,18 @@
+# -*- ruby -*-
+
+require 'rubygems'
+require 'hoe'
+
+Hoe.plugins.delete :rubyforge
+Hoe.plugin :minitest
+Hoe.plugin :gemspec # `gem install hoe-gemspec`
+Hoe.plugin :git # `gem install hoe-git`
+
+Hoe.spec 'minitest-emoji' do
+ developer('Aaron Patterson', 'aaron@tenderlovemaking.com')
+ self.readme_file = 'README.rdoc'
+ self.history_file = 'CHANGELOG.rdoc'
+ self.extra_rdoc_files = FileList['*.rdoc']
+end
+
+# vim: syntax=ruby
@@ -0,0 +1,30 @@
+module MiniTest
+ class Emoji
+ VERSION = '1.0.0'
+
+ DEFAULT = {
+ '.' => "\u{1f497} ",
+ 'E' => "\u{1f525} ",
+ 'F' => "\u{1f4a9} ",
+ 'S' => "\u{1f633} ",
+ }
+
+ attr_reader :io, :chars
+
+ def initialize io, chars = DEFAULT
+ @io = io
+ @chars = DEFAULT
+ end
+
+ def print o
+ io.print(chars[o] || o)
+ end
+
+ def method_missing msg, *args
+ return super unless io.respond_to? msg
+ io.send(msg, *args)
+ end
+ end
+end
+
+MiniTest::Unit.output = MiniTest::Emoji.new(MiniTest::Unit.output)
@@ -0,0 +1,22 @@
+require 'minitest/autorun'
+require 'minitest/emoji'
+
+describe 'my amazing tests' do
+ # generate many hearts!
+ 50.times do |i|
+ it "must #{i}" do
+ 100.must_equal 100
+ end
+ end
+
+ # generate some poops!
+ 2.times do |i|
+ it "compares #{i} to #{i + 1}" do
+ i.must_equal i + 1
+ end
+ end
+
+ it 'skips things!!' do
+ skip "don't care!"
+ end
+end

0 comments on commit 700fd58

Please sign in to comment.