mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Run only JS tests with timeout
This commit is contained in:
parent
1ac4ea7277
commit
05fa9dd9e8
3 changed files with 9 additions and 10 deletions
|
@ -6,15 +6,6 @@ shared_examples_for "session" do
|
||||||
YAML.load Nokogiri::HTML(session.body).xpath("//pre[@id='results']").first.text
|
YAML.load Nokogiri::HTML(session.body).xpath("//pre[@id='results']").first.text
|
||||||
end
|
end
|
||||||
|
|
||||||
# These specs do nothing asynchronous, timeout just slows us down.
|
|
||||||
before do
|
|
||||||
Capybara.default_wait_time = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
after do
|
|
||||||
Capybara.default_wait_time = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
describe '#app' do
|
describe '#app' do
|
||||||
it "should remember the application" do
|
it "should remember the application" do
|
||||||
@session.app.should == TestApp
|
@session.app.should == TestApp
|
||||||
|
|
|
@ -3,6 +3,14 @@ require File.expand_path('spec_helper', File.dirname(__FILE__))
|
||||||
require 'nokogiri'
|
require 'nokogiri'
|
||||||
|
|
||||||
shared_examples_for "session with javascript support" do
|
shared_examples_for "session with javascript support" do
|
||||||
|
before do
|
||||||
|
Capybara.default_wait_time = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
after do
|
||||||
|
Capybara.default_wait_time = 0
|
||||||
|
end
|
||||||
|
|
||||||
describe '#body' do
|
describe '#body' do
|
||||||
it "should return the current state of the page" do
|
it "should return the current state of the page" do
|
||||||
@session.visit('/with_js')
|
@session.visit('/with_js')
|
||||||
|
|
|
@ -18,7 +18,7 @@ require 'session_without_headers_support_spec'
|
||||||
|
|
||||||
alias :running :lambda
|
alias :running :lambda
|
||||||
|
|
||||||
Capybara.default_wait_time = 1 # less timeout so tests run faster
|
Capybara.default_wait_time = 0 # less timeout so tests run faster
|
||||||
|
|
||||||
Spec::Runner.configure do |config|
|
Spec::Runner.configure do |config|
|
||||||
config.after do
|
config.after do
|
||||||
|
|
Loading…
Add table
Reference in a new issue