[DRE-commits] [ruby-rspec-instafail] 01/108: initial
Hideki Yamane
henrich at moszumanska.debian.org
Sun Nov 15 18:36:13 UTC 2015
This is an automated email from the git hooks/post-receive script.
henrich pushed a commit to branch debian/sid
in repository ruby-rspec-instafail.
commit d4c3c3af72b4a6f9092092b770e5b25c97e936ef
Author: grosser <grosser.michael at gmail.com>
Date: Sun Aug 15 15:34:09 2010 +0200
initial
---
Readme.md | 34 ++++++++++++++++++++++++++++++++++
lib/rspec/instafail.rb | 20 ++++++++++++++++++++
2 files changed, 54 insertions(+)
diff --git a/Readme.md b/Readme.md
new file mode 100644
index 0000000..6ec54c9
--- /dev/null
+++ b/Readme.md
@@ -0,0 +1,34 @@
+Show failing specs instantly. Show passing spec as green dots as usual.
+
+Output
+======
+ ....................................................*....
+ 1: User as seller should be a seller when it has an activated shop
+ -> expected is_seller? to return false, got true
+ ..................................................................
+ 2: Product validations is invalid with too short title
+ -> expected not: == 1,
+ got: 1
+ ............................................................
+ Finished in 650.095614 seconds
+
+ 1680 examples, 2 failure, 1 pending
+
+
+
+Install
+=======
+ script/plugin install git://github.com/grosser/rspec-instafail.git
+
+
+ # spec/spec.opts
+ --format RSpec::Instafail
+
+ # spec/spec_helper.rb -- somewhere after loading environment
+ require 'rspec/instafail'
+
+Author
+======
+[Michael Grosser](http://pragmatig.wordpress.com)
+grosser.michael at gmail.com
+Hereby placed under public domain, do what you want, just do not hold me accountable...
\ No newline at end of file
diff --git a/lib/rspec/instafail.rb b/lib/rspec/instafail.rb
new file mode 100644
index 0000000..ed66353
--- /dev/null
+++ b/lib/rspec/instafail.rb
@@ -0,0 +1,20 @@
+module RSpec
+ klass = if defined? Spec
+ # rspec 1.x
+ require 'spec/runner/formatter/progress_bar_formatter'
+ Spec::Runner::Formatter::ProgressBarFormatter
+ else
+ # rspec 2.x
+ require 'rspec/core/formatter/progress_formatter'
+ RSpec::Core::Formatters::ProgressFormatter
+ end
+
+ class Instafail < klass
+ def example_failed(example, counter, failure)
+ output.puts
+ output.puts red("#{counter}: #{example_group.description} #{example.description}")
+ output.puts " -> #{failure.exception}"
+ output.flush
+ end
+ end
+end
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rspec-instafail.git
More information about the Pkg-ruby-extras-commits
mailing list