Commit bc33fa38 authored by Michael Grosser's avatar Michael Grosser

Merge pull request #26 from alex-slynko/master

Changed formatter to inherited from BaseFormatter
parents 5552ebcb 6e960119
......@@ -34,6 +34,7 @@ gem install rspec-instafail
# .rspec
--require rspec/instafail
--format RSpec::Instafail
--format progress # to keep dots appear
module RSpec
version = Gem.loaded_specs["rspec-core"].version
require "rspec/instafail/rspec_#{[3, version.segments.first].min}"
gem_spec = Gem::Specification.find_all_by_name('rspec-core').first
if gem_spec
version = gem_spec.version
require "rspec/instafail/rspec_#{[3, version.segments.first].min}"
require "rspec/instafail/rspec_1"
require 'rspec/core/formatters/progress_formatter'
require 'rspec/core/formatters/base_formatter'
module RSpec
class Instafail < RSpec::Core::Formatters::ProgressFormatter
class Instafail < RSpec::Core::Formatters::BaseFormatter
RSpec::Core::Formatters.register self, :example_failed
def initialize(output)
......@@ -60,7 +60,7 @@ describe 'RSpec::Instafail' do
context 'Rspec 3.x' do
before :all do
Bundler.with_clean_env do
@rspec_result = `cd spec/rspec_3 && bundle exec rspec a_test.rb -I ../../lib --require rspec/instafail --format RSpec::Instafail --no-color --order defined`
@rspec_result = `cd spec/rspec_3 && bundle exec rspec a_test.rb -I ../../lib --require rspec/instafail --format RSpec::Instafail --format progress --no-color --order defined`
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment