Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit aaa34ba36dfaeb21afe2f4e4b0e336600eb69e5e 0 parents
Robert Pitts and Tim Pope authored Hashrocket Workstation committed
4 .gitignore
@@ -0,0 +1,4 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
4 Gemfile
@@ -0,0 +1,4 @@
+source "http://rubygems.org"
+
+# Specify your gem's dependencies in test-align-centaur.gemspec
+gemspec
14 README.markdown
@@ -0,0 +1,14 @@
+test-align: centaur;
+====================
+
+Tired of a boring old line of dots when running your RSpec suite? Fear no
+more, as [`text-align: centaur;`](http://textaligncentaur.com) has been ported
+to RSpec in the form of `test-align: centaur;`.
+
+Usage
+-----
+
+ $ gem install test-align-centaur
+ $ rspec -f TestAlignCentaur
+
+ $ echo '--formatter TestAlignCentaur' >> ~/.rspec
2  Rakefile
@@ -0,0 +1,2 @@
+require 'bundler'
+Bundler::GemHelper.install_tasks
1  lib/test-align-centaur.rb
@@ -0,0 +1 @@
+require 'test_align_centaur'
39 lib/test_align_centaur.rb
@@ -0,0 +1,39 @@
+require 'centaur'
+require 'rspec/core/formatters/base_text_formatter'
+
+class TestAlignCentaur < RSpec::Core::Formatters::BaseTextFormatter
+
+ def print(arg)
+ if @centaur.nil?
+ @centaur = String::CENTAUR.chomp
+ elsif @centaur.empty?
+ @centaur = "\n" + String::CENTAUR.chomp
+ end
+ while char = @centaur.slice!(0)
+ break if char == 'x'
+ output.print(char)
+ end
+ output.print(arg)
+ end
+
+ def example_passed(example)
+ super(example)
+ print green('.')
+ end
+
+ def example_pending(example)
+ super(example)
+ print yellow('*')
+ end
+
+ def example_failed(example)
+ super(example)
+ print red('F')
+ end
+
+ def start_dump
+ super()
+ output.puts
+ end
+
+end
23 test-align-centaur.gemspec
@@ -0,0 +1,23 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+
+Gem::Specification.new do |s|
+ s.name = "test-align-centaur"
+ s.version = '1.0.0'
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Tim Pope", "Robert Pitts"]
+ s.email = ["code@tpo"+"pe.net"]
+ s.homepage = "http://github.com/tpope/test-align-centaur"
+ s.summary = %q{The Centaur RSpec progress bar formatter}
+ s.description = %q{Centaur your RSpec progress output}
+
+ s.rubyforge_project = "test-align-centaur"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ s.add_runtime_dependency 'centaur'
+ s.add_runtime_dependency 'rspec', '~> 2.0'
+end
Please sign in to comment.
Something went wrong with that request. Please try again.