mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Init C[ue]lerity driver/session in before(:all)
This way we don't create a crap load of instances which leads to out-of-memory exceptions.
This commit is contained in:
parent
2f3dc8f534
commit
0ed383238f
5 changed files with 7 additions and 10 deletions
|
@ -2,7 +2,7 @@ require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
|||
|
||||
if RUBY_PLATFORM =~ /java/
|
||||
describe Capybara::Driver::Celerity do
|
||||
before do
|
||||
before(:all) do
|
||||
@driver = Capybara::Driver::Celerity.new(TestApp)
|
||||
end
|
||||
|
||||
|
@ -14,4 +14,4 @@ if RUBY_PLATFORM =~ /java/
|
|||
end
|
||||
else
|
||||
puts "#{File.basename(__FILE__)} requires JRuby; skipping.."
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
||||
|
||||
describe Capybara::Driver::Culerity do
|
||||
before do
|
||||
before(:all) do
|
||||
@driver = Capybara::Driver::Culerity.new(TestApp)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
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"
|
||||
Capybara.run_server = false
|
||||
@driver = Capybara::Driver::Culerity.new(TestApp)
|
||||
end
|
||||
|
||||
after(:all) do
|
||||
|
|
|
@ -2,7 +2,7 @@ require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
|||
|
||||
if RUBY_PLATFORM =~ /java/
|
||||
describe Capybara::Driver::Celerity do
|
||||
before do
|
||||
before(:all) do
|
||||
@session = Capybara::Session.new(:celerity, TestApp)
|
||||
end
|
||||
|
||||
|
@ -24,4 +24,4 @@ if RUBY_PLATFORM =~ /java/
|
|||
end
|
||||
else
|
||||
puts "#{File.basename(__FILE__)} requires JRuby; skipping.."
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ require File.expand_path('../spec_helper', File.dirname(__FILE__))
|
|||
|
||||
describe Capybara::Session do
|
||||
context 'with culerity driver' do
|
||||
before do
|
||||
before(:all) do
|
||||
@session = Capybara::Session.new(:culerity, TestApp)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue