Permalink
Browse files

Don't need a file for this.

  • Loading branch information...
justinko committed Jun 23, 2012
1 parent 34cbadc commit 1f58ed92258ad2bf10b0b8609a7bedb85d5b8823
Showing with 13 additions and 22 deletions.
  1. +13 −7 lib/rspec/rails.rb
  2. +0 −15 lib/rspec/rails/application.rb
View
@@ -1,10 +1,5 @@
require 'rspec/core'
-RSpec.configure do |c|
- c.backtrace_clean_patterns << /vendor\//
- c.backtrace_clean_patterns << /lib\/rspec\/rails/
-end
-
module RSpec
module Rails
def self.at_least_rails_3_1?
@@ -13,6 +8,18 @@ def self.at_least_rails_3_1?
end
end
+RSpec.configure do |config|
+ config.backtrace_clean_patterns << /vendor\//
+ config.backtrace_clean_patterns << /lib\/rspec\/rails/
+ config.add_setting :application, :default => ::Rails.application
+
+ unless RSpec::Rails.at_least_rails_3_1?
+ def config.application=(*)
+ raise 'Setting the application is only supported on Rails 3.1 and above.'
+ end
+ end
+end
+
require 'rspec/rails/extensions'
require 'rspec/rails/view_rendering'
require 'rspec/rails/adapters'
@@ -22,5 +29,4 @@ def self.at_least_rails_3_1?
require 'rspec/rails/module_inclusion'
require 'rspec/rails/example'
require 'rspec/rails/vendor/capybara'
-require 'rspec/rails/vendor/webrat'
-require 'rspec/rails/application'
+require 'rspec/rails/vendor/webrat'
@@ -1,15 +0,0 @@
-module RSpec
- module Rails
- module Application
- RSpec.configuration.add_setting :application, :default => ::Rails.application
-
- unless RSpec::Rails.at_least_rails_3_1?
- class << RSpec.configuration
- def application=(*)
- raise 'Setting the application is only supported on Rails 3.1 and above.'
- end
- end
- end
- end
- end
-end

0 comments on commit 1f58ed9

Please sign in to comment.