Skip to content

Instantly share code, notes, and snippets.

@markbates
Created March 28, 2011 19:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markbates/891102 to your computer and use it in GitHub Desktop.
Save markbates/891102 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe "Registration" do
before(:all) do
FakeWeb.allow_net_connect = true
end
after(:all) do
FakeWeb.allow_net_connect = false
end
it "should allow a user to register", :js => true do
#tests here...
end
end
require 'selenium-webdriver'
class Selenium::WebDriver::Remote::Bridge
def quit_with_fakeweb
FakeWeb.allow_net_connect = true
quit_without_fakeweb
end
alias_method_chain :quit, :fakeweb
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment