Created
March 28, 2011 19:28
-
-
Save markbates/891102 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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