Permalink
Browse files

Add appraisal to test across versions; fix support for capybara 1.0

  • Loading branch information...
1 parent 8ee2f5c commit 8d3775dd7497c9b2df63c0348b7d718b16f9436b @jferris jferris committed Sep 30, 2011
View
@@ -0,0 +1,7 @@
+appraise "1.0" do
+ gem "capybara", "~> 1.0.0"
+end
+
+appraise "1.1" do
+ gem "capybara", "~> 1.1.0"
+end
View
@@ -1,2 +1,8 @@
source "http://rubygems.org"
gemspec
+# gem "appraisal"
+# gem "rspec", '~> 2.6.0', :require => false
+# gem "capybara"
+# gem "sinatra", :require => false
+# gem "mini_magick", :require => false
+# gem 'rake'
View
@@ -7,6 +7,9 @@ PATH
GEM
remote: http://rubygems.org/
specs:
+ appraisal (0.3.8)
+ bundler
+ rake
capybara (1.1.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
@@ -18,7 +21,7 @@ GEM
ffi (~> 1.0.6)
diff-lcs (1.1.2)
ffi (1.0.9)
- json_pure (1.6.0)
+ json_pure (1.6.1)
mime-types (1.16)
mini_magick (3.2.1)
subexec (~> 0.0.4)
@@ -36,7 +39,7 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
rubyzip (0.9.4)
- selenium-webdriver (2.6.0)
+ selenium-webdriver (2.7.0)
childprocess (>= 0.2.1)
ffi (>= 1.0.7)
json_pure
@@ -53,6 +56,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ appraisal
capybara-webkit!
mini_magick
rake
View
@@ -3,6 +3,7 @@ require 'bundler/setup'
require 'rspec/core/rake_task'
require 'rake/gempackagetask'
require 'capybara_webkit_builder'
+require 'appraisal'
desc "Generate a Makefile using qmake"
file 'Makefile' do
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
s.add_development_dependency "sinatra"
s.add_development_dependency "mini_magick"
s.add_development_dependency "rake"
+ s.add_development_dependency "appraisal"
s.extensions = "extconf.rb"
end
@@ -0,0 +1,7 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "capybara", "~> 1.0.0"
+
+gemspec :path=>"../"
@@ -0,0 +1,65 @@
+PATH
+ remote: /Users/jferris/Source/capybara-webkit
+ specs:
+ capybara-webkit (0.6.1)
+ capybara (< 1.2, >= 1.0.0)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ appraisal (0.3.8)
+ bundler
+ rake
+ capybara (1.0.1)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.2.2)
+ ffi (~> 1.0.6)
+ diff-lcs (1.1.3)
+ ffi (1.0.9)
+ json_pure (1.6.1)
+ mime-types (1.16)
+ mini_magick (3.3)
+ subexec (~> 0.1.0)
+ nokogiri (1.5.0)
+ rack (1.3.3)
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rake (0.9.2)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ rubyzip (0.9.4)
+ selenium-webdriver (2.7.0)
+ childprocess (>= 0.2.1)
+ ffi (>= 1.0.7)
+ json_pure
+ rubyzip
+ sinatra (1.2.6)
+ rack (~> 1.1)
+ tilt (< 2.0, >= 1.2.2)
+ subexec (0.1.0)
+ tilt (1.3.3)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ appraisal
+ capybara (~> 1.0.0)
+ capybara-webkit!
+ mini_magick
+ rake
+ rspec (~> 2.6.0)
+ sinatra
@@ -0,0 +1,7 @@
+# This file was generated by Appraisal
+
+source "http://rubygems.org"
+
+gem "capybara", "~> 1.1.0"
+
+gemspec :path=>"../"
@@ -0,0 +1,65 @@
+PATH
+ remote: /Users/jferris/Source/capybara-webkit
+ specs:
+ capybara-webkit (0.6.1)
+ capybara (< 1.2, >= 1.0.0)
+
+GEM
+ remote: http://rubygems.org/
+ specs:
+ appraisal (0.3.8)
+ bundler
+ rake
+ capybara (1.1.1)
+ mime-types (>= 1.16)
+ nokogiri (>= 1.3.3)
+ rack (>= 1.0.0)
+ rack-test (>= 0.5.4)
+ selenium-webdriver (~> 2.0)
+ xpath (~> 0.1.4)
+ childprocess (0.2.2)
+ ffi (~> 1.0.6)
+ diff-lcs (1.1.3)
+ ffi (1.0.9)
+ json_pure (1.6.1)
+ mime-types (1.16)
+ mini_magick (3.3)
+ subexec (~> 0.1.0)
+ nokogiri (1.5.0)
+ rack (1.3.3)
+ rack-test (0.6.1)
+ rack (>= 1.0)
+ rake (0.9.2)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
+ diff-lcs (~> 1.1.2)
+ rspec-mocks (2.6.0)
+ rubyzip (0.9.4)
+ selenium-webdriver (2.7.0)
+ childprocess (>= 0.2.1)
+ ffi (>= 1.0.7)
+ json_pure
+ rubyzip
+ sinatra (1.2.6)
+ rack (~> 1.1)
+ tilt (< 2.0, >= 1.2.2)
+ subexec (0.1.0)
+ tilt (1.3.3)
+ xpath (0.1.4)
+ nokogiri (~> 1.3)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ appraisal
+ capybara (~> 1.1.0)
+ capybara-webkit!
+ mini_magick
+ rake
+ rspec (~> 2.6.0)
+ sinatra
@@ -96,7 +96,11 @@ def invoke(name, *args)
end
def allow_unattached_nodes?
- !Capybara.automatic_reload
+ !automatic_reload?
+ end
+
+ def automatic_reload?
+ Capybara.respond_to?(:automatic_reload) && Capybara.automatic_reload
end
def attached?
View
@@ -998,8 +998,14 @@ def echoed_cookie
end
end
- before { Capybara.automatic_reload = false }
- after { Capybara.automatic_reload = true }
+ before { set_automatic_reload false }
+ after { set_automatic_reload true }
+
+ def set_automatic_reload(value)
+ if Capybara.respond_to?(:automatic_reload)
+ Capybara.automatic_reload = value
+ end
+ end
it "allows removed nodes when reloading is disabled" do
node = subject.find("//p[@id='removeMe']").first

0 comments on commit 8d3775d

Please sign in to comment.