Sha256: ef573a0c72bf93ab04375b0e6b969703a1c355b7a9b55535ac85e52f853cebcb

Contents?: true

Size: 568 Bytes

Versions: 1

Compression:

Stored size: 568 Bytes

Contents

ENV["RACK_ENV"] = "test"

require "penguin"

# Make the App (and Sprockets) think spec/dummy is the root
Dir.chdir("spec/dummy")
require "penguin/application"
Dir.chdir("../..")

require "pathname"
require "pry"
require "capybara/rspec"

RSpec.configure do |config|
  Capybara.app = Penguin::Application

  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

  alias :silence :capture
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
penguin-0.0.1.beta1 spec/spec_helper.rb