Sha256: e660336ee015833db3d4f7d3760f8408845c50b7806ffe07720ab1c84a174453

Contents?: true

Size: 531 Bytes

Versions: 2

Compression:

Stored size: 531 Bytes

Contents

require 'rspec/core'
require 'rails-app-spec'

RSpec.configure do |config| 
  config.before do                                         
    Rails3::Assist::Directory.rails_root = temp_dir('tmp_rails')
  end

  config.after do
    remove_temp_dir 'tmp_rails'
  end
   
end

def project_dir
  File.dirname(__FILE__) + '/..'
end

def temp_dir name
  File.join(project_dir, name)  
end

def make_temp_dir name   
  FileUtils.mkdir_p temp_dir(name)
  temp_dir(name)
end

def remove_temp_dir name   
  FileUtils.rm_rf temp_dir(name)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails-app-spec-0.2.7 spec/spec_helper.rb
rails-app-spec-0.2.5 spec/spec_helper.rb