<commit_before>require File.expand_path('spec_helper', File.dirname(__FILE__))

require 'capybara'

describe Capybara do
  
  describe 'default_wait_time' do
    after do
      Capybara.default_wait_time = 2
    end
    
    it "should be changeable" do
      Capybara.default_wait_time = 5
      Capybara.default_wait_time.should == 5
    end
  end

  describe '.register_driver' do
    it "should add a new driver" do
      Capybara.register_driver :schmoo do |app|
        Capybara::Driver::RackTest.new(app)
      end
      session = Capybara::Session.new(:schmoo, TestApp)
      session.visit('/')
      session.body.should include("Hello world!")
    end
  end
  
end<commit_msg>Reset default_wait_time to correct value after test<commit_after>require File.expand_path('spec_helper', File.dirname(__FILE__))

require 'capybara'

describe Capybara do

  describe 'default_wait_time' do
    after do
      Capybara.default_wait_time = @previous_default_time
    end

    it "should be changeable" do
      @previous_default_time = Capybara.default_wait_time
      Capybara.default_wait_time = 5
      Capybara.default_wait_time.should == 5
    end
  end

  describe '.register_driver' do
    it "should add a new driver" do
      Capybara.register_driver :schmoo do |app|
        Capybara::Driver::RackTest.new(app)
      end
      session = Capybara::Session.new(:schmoo, TestApp)
      session.visit('/')
      session.body.should include("Hello world!")
    end
  end

end
{'fraction_non_alphanumeric': 0.0878972278566599, 'fraction_numerical': 0.0033806626098715348, 'mean_word_length': 3.1926345609065154, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5134867', 'n_tokens_mistral': 490, 'n_tokens_neox': 478, 'n_words': 113}