Permalink
Browse files

move inclusion of integration example group before any examples are d…

…efined
  • Loading branch information...
1 parent 533f60d commit 2cb00c3dde49851ead77af216faa9c92ddfd9196 @jeremyruppel jeremyruppel committed with Ben Marini May 25, 2011
Showing with 7 additions and 5 deletions.
  1. +7 −1 spec/spec_helper.rb
  2. +0 −4 spec/support/integration_example_group.rb
View
@@ -67,7 +67,6 @@ def describe_with_render(*args, &block)
# Setup a describe block which uses capybara and rails integration
# test methods.
def describe_with_capybara(*args, &block)
- require 'integration_example_group'
describe *args do
include RSpec::Rails::IntegrationExampleGroup
module_eval &block
@@ -118,6 +117,13 @@ def mock_action_view(assigns = {})
config.use_instantiated_fixtures = false
end
+# All RSpec configuration needs to happen before any examples
+# or else it whines.
+require 'integration_example_group'
+RSpec.configure do |c|
+ c.include RSpec::Rails::IntegrationExampleGroup, :example_group => { :file_path => /\bspec\/integration\// }
+end
+
# Ensure this is defined for Ruby 1.8
module MiniTest; class Assertion < Exception; end; end
@@ -28,10 +28,6 @@ def last_response
@router = ::Rails.application.routes
end
end
-
- RSpec.configure do |c|
- c.include self, :example_group => { :file_path => /\bspec\/integration\// }
- end
end
end
end

0 comments on commit 2cb00c3

Please sign in to comment.