1234567891011121314151617181920212223242526272829 |
- # Set up RSpec
- require 'webmock/rspec'
- Spec::Runner.configure do |config|
- config.include WebMock::API
- end
- # Set up generator tests
- require 'rails/all'
- require 'rails/generators'
- require 'rails/generators/test_case'
- class TestApp < Rails::Application
- config.root = File.dirname(__FILE__)
- end
- Rails.application = TestApp
- module Rails
- def self.root
- @root ||= File.expand_path("../../tmp/rails", __FILE__)
- end
- end
- Rails.application.config.root = Rails.root
- # Call configure to load the settings from
- # Rails.application.config.generators to Rails::Generators
- Rails::Generators.configure!
|