Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed the functionality to create a test Rails.application

This was causing problems for gems that created their own test application (just added in 0.2.7 and unused).

I will re-introduce this feature in a future release (0.3.0?)
  • Loading branch information...
commit 8b407c74c30cf3f1757bdacd5a5f8eff88d65476 1 parent 4fdc8cf
@alexrothenberg authored
View
9 features/templates/my_rails_gem/spec/spec_helper.rb
@@ -1,5 +1,14 @@
require 'bundler/setup'
require 'rails/all'
+
+module MyRailsGem
+ module TestApp
+ class Application < Rails::Application
+ config.root = File.dirname(__FILE__)
+ end
+ end
+end
+
require 'ammeter/init'
Bundler.require
View
13 lib/ammeter/init.rb
@@ -2,15 +2,6 @@
require 'ammeter/rspec/generator/matchers.rb'
require 'rails'
-if Rails.application.nil?
- # We are in a gem so create test Rails app
- module Ammeter
- module TestApp
- class Application < Rails::Application
- config.root = File.dirname(__FILE__)
- end
- end
- end
+if Rails.respond_to?(:application) && Rails.application.respond_to?(:load_generators)
+ Rails.application.load_generators
end
-
-Rails.application.load_generators
Please sign in to comment.
Something went wrong with that request. Please try again.