mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
Added commented out integration specs
This commit is contained in:
parent
69ef4e73dc
commit
7451010c18
7 changed files with 51 additions and 2 deletions
1
Gemfile
1
Gemfile
|
@ -2,4 +2,5 @@ source "http://rubygems.org"
|
|||
gem "rake"
|
||||
gem "rspec", :require => false
|
||||
gem "capybara"
|
||||
gem "sinatra", :require => false
|
||||
|
||||
|
|
|
@ -38,6 +38,10 @@ GEM
|
|||
ffi (~> 0.6.3)
|
||||
json_pure
|
||||
rubyzip
|
||||
sinatra (1.1.2)
|
||||
rack (~> 1.1)
|
||||
tilt (~> 1.2)
|
||||
tilt (1.2.2)
|
||||
xpath (0.1.3)
|
||||
nokogiri (~> 1.3)
|
||||
|
||||
|
@ -48,3 +52,4 @@ DEPENDENCIES
|
|||
capybara
|
||||
rake
|
||||
rspec
|
||||
sinatra
|
||||
|
|
2
Rakefile
2
Rakefile
|
@ -56,7 +56,7 @@ task :build => :qmake do
|
|||
end
|
||||
|
||||
RSpec::Core::RakeTask.new do |t|
|
||||
t.pattern = "spec/*_spec.rb"
|
||||
t.pattern = "spec/{*_spec.rb,**/*_spec.rb}"
|
||||
t.rspec_opts = "--format progress"
|
||||
end
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ class Capybara::Driver::Webkit
|
|||
@socket.puts name
|
||||
@socket.puts args.size
|
||||
args.each do |arg|
|
||||
@socket.puts arg.bytesize
|
||||
@socket.puts arg.to_s.bytesize
|
||||
@socket.print arg
|
||||
end
|
||||
check
|
||||
|
|
22
spec/integration/driver_spec.rb
Normal file
22
spec/integration/driver_spec.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
require 'spec_helper'
|
||||
require 'capybara/driver/webkit'
|
||||
|
||||
describe Capybara::Driver::Webkit do
|
||||
before do
|
||||
@driver = Capybara::Driver::Webkit.new(TestApp)
|
||||
end
|
||||
|
||||
# TODO: select options
|
||||
# it_should_behave_like "driver"
|
||||
|
||||
# TODO: bug with drag and drop
|
||||
# it_should_behave_like "driver with javascript support"
|
||||
|
||||
# TODO: needs to reset cookies after each test
|
||||
# it_should_behave_like "driver with cookies support"
|
||||
|
||||
# Can't support:
|
||||
# it_should_behave_like "driver with header support"
|
||||
# it_should_behave_like "driver with status code support"
|
||||
# it_should_behave_like "driver with frame support"
|
||||
end
|
12
spec/integration/session_spec.rb
Normal file
12
spec/integration/session_spec.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
require 'spec_helper'
|
||||
require 'capybara-webkit'
|
||||
|
||||
describe Capybara::Session do
|
||||
before do
|
||||
@session = Capybara::Session.new(:webkit, TestApp)
|
||||
end
|
||||
|
||||
# TODO: needs to only use one Browser throughout tests
|
||||
# it_should_behave_like "session"
|
||||
# it_should_behave_like "session with javascript support"
|
||||
end
|
|
@ -8,3 +8,12 @@ ENV["PATH"] = ENV["PATH"] + ":" + File.join(PROJECT_ROOT, "bin")
|
|||
|
||||
Dir[File.join(PROJECT_ROOT, 'spec', 'support', '**', '*.rb')].each { |file| require(file) }
|
||||
|
||||
spec_dir = nil
|
||||
$:.detect do |dir|
|
||||
if File.exists? File.join(dir, "capybara.rb")
|
||||
spec_dir = File.expand_path(File.join(dir,"..","spec"))
|
||||
$:.unshift( spec_dir )
|
||||
end
|
||||
end
|
||||
|
||||
require File.join(spec_dir,"spec_helper")
|
||||
|
|
Loading…
Add table
Reference in a new issue