From 84d0f66b05319c9080420531bd2a656038db7296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Rodr=C3=ADguez-Baltan=C3=A1s=20D=C3=ADaz?= Date: Sat, 14 May 2011 12:02:26 -0700 Subject: [PATCH] There is a deprecation warning about rspec 3 that says that no configuration option should be set after defining a group of specs. This commit fix the issue by moving the setting of options to a position before the specs are required loaded. --- spec/spec_helper.rb | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8e129e2d5..38ab74112 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,6 +5,15 @@ require 'rspec' require 'capybara' + +RSpec.configure do |config| + config.before do + Capybara.configure do |config| + config.default_selector = :xpath + end + end +end + require 'capybara/spec/driver' require 'capybara/spec/session' @@ -15,12 +24,4 @@ module TestSessions RackTest = Capybara::Session.new(:rack_test, TestApp) Selenium = Capybara::Session.new(:selenium, TestApp) -end - -RSpec.configure do |config| - config.before do - Capybara.configure do |config| - config.default_selector = :xpath - end - end -end +end \ No newline at end of file