mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
Add appraisal to test across versions; fix support for capybara 1.0
This commit is contained in:
parent
8ee2f5ce23
commit
8d3775dd74
11 changed files with 178 additions and 5 deletions
7
Appraisals
Normal file
7
Appraisals
Normal file
|
@ -0,0 +1,7 @@
|
|||
appraise "1.0" do
|
||||
gem "capybara", "~> 1.0.0"
|
||||
end
|
||||
|
||||
appraise "1.1" do
|
||||
gem "capybara", "~> 1.1.0"
|
||||
end
|
6
Gemfile
6
Gemfile
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
1
Rakefile
1
Rakefile
|
@ -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
|
||||
|
||||
|
|
7
gemfiles/1.0.gemfile
Normal file
7
gemfiles/1.0.gemfile
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This file was generated by Appraisal
|
||||
|
||||
source "http://rubygems.org"
|
||||
|
||||
gem "capybara", "~> 1.0.0"
|
||||
|
||||
gemspec :path=>"../"
|
65
gemfiles/1.0.gemfile.lock
Normal file
65
gemfiles/1.0.gemfile.lock
Normal file
|
@ -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
|
7
gemfiles/1.1.gemfile
Normal file
7
gemfiles/1.1.gemfile
Normal file
|
@ -0,0 +1,7 @@
|
|||
# This file was generated by Appraisal
|
||||
|
||||
source "http://rubygems.org"
|
||||
|
||||
gem "capybara", "~> 1.1.0"
|
||||
|
||||
gemspec :path=>"../"
|
65
gemfiles/1.1.gemfile.lock
Normal file
65
gemfiles/1.1.gemfile.lock
Normal file
|
@ -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 @@ class Capybara::Driver::Webkit
|
|||
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?
|
||||
|
|
|
@ -998,8 +998,14 @@ describe Capybara::Driver::Webkit do
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue