Sha256: 8b2c9a8677af786c154702a968f5e7936322741d23e321e29d9ffc1b292227ba

Contents?: true

Size: 966 Bytes

Versions: 20

Compression:

Stored size: 966 Bytes

Contents

require "rubygems"
require "bundler"
require 'stringio'
require 'tmpdir'

envs = [:default, :development]
envs << :debug if ENV["DEBUG"]
Bundler.setup(*envs)

$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "../lib")))
require "jasmine"

if Jasmine::Dependencies.rspec2?
  require 'rspec'
else
  require 'spec'
end


def create_rails(name)
  if Jasmine::Dependencies.rails3?
    `rails new #{name}`
  else
    `rails #{name}`
  end
end

def create_temp_dir
  tmp = File.join(Dir.tmpdir, "jasmine-gem-test_#{Time.now.to_f}")
  FileUtils.rm_r(tmp, :force => true)
  FileUtils.mkdir(tmp)
  tmp
end

def temp_dir_before
  @root = File.expand_path(File.join(File.dirname(__FILE__), ".."))
  @old_dir = Dir::pwd
  @tmp = create_temp_dir
end

def temp_dir_after
  Dir::chdir @old_dir
  FileUtils.rm_r @tmp
end

module Kernel
  def capture_stdout
    out = StringIO.new
    $stdout = out
    yield
    return out.string
  ensure
    $stdout = STDOUT
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
rally-jasmine-1.2.0.18 spec/spec_helper.rb
rally-jasmine-1.2.0.12 spec/spec_helper.rb
rally-jasmine-1.2.0.11 spec/spec_helper.rb
jasmine-multi_json-1.3.2.1 spec/spec_helper.rb
jasmine-1.3.2 spec/spec_helper.rb
rally-jasmine-1.2.0.10 spec/spec_helper.rb
rally-jasmine-1.2.0.8 spec/spec_helper.rb
jasmine-multi_json-1.3.1.1 spec/spec_helper.rb
jasmine-1.3.1 spec/spec_helper.rb
jasmine-1.3.0 spec/spec_helper.rb
rally-jasmine-1.2.0.7 spec/spec_helper.rb
rally-jasmine-1.2.0.6 spec/spec_helper.rb
rally-jasmine-1.2.0.5 spec/spec_helper.rb
rally-jasmine-1.2.0.4 spec/spec_helper.rb
rally-jasmine-1.2.0.3 spec/spec_helper.rb
rally-jasmine-1.2.0.2 spec/spec_helper.rb
rally-jasmine-1.2.0.1 spec/spec_helper.rb
rally-jasmine-1.2.0 spec/spec_helper.rb
jasmine-1.2.1 spec/spec_helper.rb
jasmine-1.2.0 spec/spec_helper.rb