Sha256: fca3044bea81b2b41d4e04fffd454029dbec8f08e4c89ddcd1cb342488b861d1

Contents?: true

Size: 782 Bytes

Versions: 3

Compression:

Stored size: 782 Bytes

Contents

require 'rspec'
require 'rails3_assist'
require 'rails-app-spec'
require 'tmpdir'

# RSpec::Generator.configure do |config|
#   config.debug = false
#   config.remove_temp_dir = false #true
#   config.default_rails_root(__FILE__) 
#   config.lib = File.dirname(__FILE__) + '/../lib'
#   config.logger = :stdout  
# end
#    

require 'fixtures'

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

Rails3::Assist::Directory.rails_root = temp_dir('tmp_rails')

RSpec.configure do |config|
  config.mock_with :mocha
  config.after do
    remove_temp_dir 'tmp_rails'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails3_assist-0.2.10 spec/spec_helper.rb
rails3_assist-0.2.9 spec/spec_helper.rb
rails3_assist-0.2.8 spec/spec_helper.rb