Sha256: e278d87bc34b8a0dea2ad973bbbae9b7a6ccf8d5d6fca030f8e2bb58234e59cb
Contents?: true
Size: 1.14 KB
Versions: 4
Compression:
Stored size: 1.14 KB
Contents
require 'simplecov' SimpleCov.start require 'rspec' require 'stringio' require 'rspec/core/formatters/progress_formatter' # doesn't say so much about pending guys class QuietPendingFormatter < RSpec::Core::Formatters::ProgressFormatter def example_pending(example) output.print pending_color('*') end end require 'rspec/core/formatters/documentation_formatter' class QuietPendingDocFormatter < RSpec::Core::Formatters::DocumentationFormatter def example_pending(example) output.puts pending_color( "<pending>: #{example.execution_result[:pending_message]}" ) end end RSpec.configure do |config| config.treat_symbols_as_metadata_keys_with_true_values = true config.formatter = QuietPendingDocFormatter config.color = true end TESTFILES = File.dirname(__FILE__) + "/testfiles" module Kernel # from: http://thinkingdigitally.com/archive/capturing-output-from-puts-in-ruby/ def capture_stdout out = StringIO.new $stdout = out yield return out.string ensure $stdout = STDOUT end def capture_stderr out = StringIO.new $stderr = out yield return out.string ensure $stderr = STDERR end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
rubabel-0.4.3 | spec/spec_helper.rb |
rubabel-0.4.2 | spec/spec_helper.rb |
rubabel-0.4.1 | spec/spec_helper.rb |
rubabel-0.4.0 | spec/spec_helper.rb |