Sha256: 4bd84523fa27a5b28a0f7684c34b909b8ffbbcf9dc8291f819506c3d108b1a7c

Contents?: true

Size: 733 Bytes

Versions: 3

Compression:

Stored size: 733 Bytes

Contents

require 'rubygems'
require 'spec'
require File.dirname(__FILE__) + '/../lib/govkit'

# prevent the use of `` in tests
Spec::Runner.configure do |configuration|
end

# When running specs in TextMate, provide an rputs method to cleanly print objects into HTML display
# From http://talklikeaduck.denhaven2.com/2009/09/23/rspec-textmate-pro-tip
module Kernel
  if ENV.keys.find {|env_var| env_var.index("TM_")}
    def rputs(*args)
      require 'cgi'
      puts( *["<pre>", args.collect {|a| CGI.escapeHTML(a.to_s)}, "</pre>"])
    end
    def rp(*args)
      require 'cgi'
      puts( *["<pre>", args.collect {|a| CGI.escapeHTML(a.inspect)}, "</pre>"])
    end
  else
    alias_method :rputs, :puts
    alias_method :rp, :p
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
govkit-0.1.0 spec/spec_helper.rb
govkit-0.0.2 spec/spec_helper.rb
govkit-0.0.1 spec/spec_helper.rb