Run only JS tests with timeout

This commit is contained in:
Jonas Nicklas 2010-01-30 20:09:27 +01:00
parent 1ac4ea7277
commit 05fa9dd9e8
3 changed files with 9 additions and 10 deletions

View File

@ -6,15 +6,6 @@ shared_examples_for "session" do
YAML.load Nokogiri::HTML(session.body).xpath("//pre[@id='results']").first.text
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
it "should remember the application" do
@session.app.should == TestApp

View File

@ -3,6 +3,14 @@ require File.expand_path('spec_helper', File.dirname(__FILE__))
require 'nokogiri'
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
it "should return the current state of the page" do
@session.visit('/with_js')

View File

@ -18,7 +18,7 @@ require 'session_without_headers_support_spec'
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|
config.after do