mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Run driver spec as remote instead
Running session spec is too slow
This commit is contained in:
parent
d8c8cd6bfb
commit
b57efde45c
4 changed files with 37 additions and 66 deletions
19
spec/driver/remote_culerity_driver_spec.rb
Normal file
19
spec/driver/remote_culerity_driver_spec.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
||||
|
||||
describe Capybara::Driver::Culerity do
|
||||
before do
|
||||
@driver = Capybara::Driver::Culerity.new(TestApp)
|
||||
end
|
||||
|
||||
before(:all) do
|
||||
Capybara.app_host = "http://capybara-testapp.heroku.com"
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
Capybara.app_host = nil
|
||||
end
|
||||
|
||||
it_should_behave_like "driver"
|
||||
it_should_behave_like "driver with javascript support"
|
||||
it_should_behave_like "driver with header support"
|
||||
end
|
18
spec/driver/remote_selenium_driver_spec.rb
Normal file
18
spec/driver/remote_selenium_driver_spec.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
||||
|
||||
describe Capybara::Driver::Selenium do
|
||||
before(:all) do
|
||||
Capybara.app_host = "http://capybara-testapp.heroku.com"
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
Capybara.app_host = nil
|
||||
end
|
||||
|
||||
before do
|
||||
@driver = Capybara::Driver::Selenium.new(TestApp)
|
||||
end
|
||||
|
||||
it_should_behave_like "driver"
|
||||
it_should_behave_like "driver with javascript support"
|
||||
end
|
|
@ -1,33 +0,0 @@
|
|||
require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
||||
|
||||
describe Capybara::Session do
|
||||
context 'with culerity driver' do
|
||||
before(:all) do
|
||||
Capybara.app_host = "http://capybara-testapp.heroku.com"
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
Capybara.app_host = nil
|
||||
end
|
||||
|
||||
before do
|
||||
@session = Capybara::Session.new(:culerity, TestApp)
|
||||
end
|
||||
|
||||
describe '#driver' do
|
||||
it "should be a rack test driver" do
|
||||
@session.driver.should be_an_instance_of(Capybara::Driver::Culerity)
|
||||
end
|
||||
end
|
||||
|
||||
describe '#mode' do
|
||||
it "should remember the mode" do
|
||||
@session.mode.should == :culerity
|
||||
end
|
||||
end
|
||||
|
||||
it_should_behave_like "session"
|
||||
it_should_behave_like "session with javascript support"
|
||||
it_should_behave_like "session with headers support"
|
||||
end
|
||||
end
|
|
@ -1,33 +0,0 @@
|
|||
require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
||||
|
||||
describe Capybara::Session do
|
||||
context 'with selenium driver on a remote host' do
|
||||
before(:all) do
|
||||
Capybara.app_host = "http://capybara-testapp.heroku.com"
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
Capybara.app_host = nil
|
||||
end
|
||||
|
||||
before do
|
||||
@session = Capybara::Session.new(:selenium, TestApp)
|
||||
end
|
||||
|
||||
describe '#driver' do
|
||||
it "should be a selenium driver" do
|
||||
@session.driver.should be_an_instance_of(Capybara::Driver::Selenium)
|
||||
end
|
||||
end
|
||||
|
||||
describe '#mode' do
|
||||
it "should remember the mode" do
|
||||
@session.mode.should == :selenium
|
||||
end
|
||||
end
|
||||
|
||||
it_should_behave_like "session"
|
||||
it_should_behave_like "session with javascript support"
|
||||
it_should_behave_like "session without headers support"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue