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

Version Path
nora_mark-0.2beta18 spec/spec_helper.rb
nora_mark-0.2beta16 spec/spec_helper.rb
nora_mark-0.2beta15 spec/spec_helper.rb
nora_mark-0.2beta14 spec/spec_helper.rb
nora_mark-0.2beta13 spec/spec_helper.rb
nora_mark-0.2beta12 spec/spec_helper.rb
nora_mark_htmlbook-0.0.1 spec/spec_helper.rb
nora_mark-0.2beta11 spec/spec_helper.rb
nora_mark-0.2beta10 spec/spec_helper.rb
nora_mark-0.2beta9 spec/spec_helper.rb
nora_mark-0.2beta8 spec/spec_helper.rb