Added commented out integration specs
This commit is contained in:
parent
69ef4e73dc
commit
7451010c18
1
Gemfile
1
Gemfile
|
@ -2,4 +2,5 @@ source "http://rubygems.org"
|
||||||
gem "rake"
|
gem "rake"
|
||||||
gem "rspec", :require => false
|
gem "rspec", :require => false
|
||||||
gem "capybara"
|
gem "capybara"
|
||||||
|
gem "sinatra", :require => false
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,10 @@ GEM
|
||||||
ffi (~> 0.6.3)
|
ffi (~> 0.6.3)
|
||||||
json_pure
|
json_pure
|
||||||
rubyzip
|
rubyzip
|
||||||
|
sinatra (1.1.2)
|
||||||
|
rack (~> 1.1)
|
||||||
|
tilt (~> 1.2)
|
||||||
|
tilt (1.2.2)
|
||||||
xpath (0.1.3)
|
xpath (0.1.3)
|
||||||
nokogiri (~> 1.3)
|
nokogiri (~> 1.3)
|
||||||
|
|
||||||
|
@ -48,3 +52,4 @@ DEPENDENCIES
|
||||||
capybara
|
capybara
|
||||||
rake
|
rake
|
||||||
rspec
|
rspec
|
||||||
|
sinatra
|
||||||
|
|
2
Rakefile
2
Rakefile
|
@ -56,7 +56,7 @@ task :build => :qmake do
|
||||||
end
|
end
|
||||||
|
|
||||||
RSpec::Core::RakeTask.new do |t|
|
RSpec::Core::RakeTask.new do |t|
|
||||||
t.pattern = "spec/*_spec.rb"
|
t.pattern = "spec/{*_spec.rb,**/*_spec.rb}"
|
||||||
t.rspec_opts = "--format progress"
|
t.rspec_opts = "--format progress"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class Capybara::Driver::Webkit
|
||||||
@socket.puts name
|
@socket.puts name
|
||||||
@socket.puts args.size
|
@socket.puts args.size
|
||||||
args.each do |arg|
|
args.each do |arg|
|
||||||
@socket.puts arg.bytesize
|
@socket.puts arg.to_s.bytesize
|
||||||
@socket.print arg
|
@socket.print arg
|
||||||
end
|
end
|
||||||
check
|
check
|
||||||
|
|
|
@ -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
|
|
@ -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) }
|
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…
Reference in New Issue