Sha256: fa8ca6895b117e3c476daf5bb8a3b7930cace175fbf950c7e7bcd9d32c4c03c6
Contents?: true
Size: 1019 Bytes
Versions: 11
Compression:
Stored size: 1019 Bytes
Contents
require 'coveralls' Coveralls.wear! require 'byebug' begin require 'rspec' rescue LoadError require 'rubygems' unless ENV['NO_RUBYGEMS'] gem 'rspec' require 'spec' end RSpec.configure do |config| # Use color in STDOUT config.color_enabled = true # Use color not only in STDOUT but also in pagers and files config.tty = true # Use the specified formatter config.formatter = :documentation # :progress, :html, :textmate def capture(stream) begin stream = stream.to_s eval "$#{stream} = StringIO.new" yield result = eval("$#{stream}").string ensure eval "$#{stream} = #{stream.upcase}" end result end end require 'rspec/core/formatters/base_text_formatter' module RSpec module Core module Formatters class DocumentationFormatter < BaseTextFormatter # def green(text); color(text, "\e[42m") end def red(text); color(text, "\e[41m") end # def magenta(text); color(text, "\e[45m") end end end end end
Version data entries
11 entries across 11 versions & 2 rubygems