There doesn't appear to be any before(:suite) equivalent for Minitest
so this is the least-surprising way to do this.
Object.const_set("ID_KEY", client_applications(:oauth_web_app).key)
Object.const_set("POTLATCH2_KEY", client_applications(:oauth_web_app).key)
Object.const_set("ID_KEY", client_applications(:oauth_web_app).key)
Object.const_set("POTLATCH2_KEY", client_applications(:oauth_web_app).key)
- stub_request(:get, "http://api.hostip.info/country.php?ip=0.0.0.0")
- stub_request(:get, "http://api.hostip.info/country.php?ip=0.0.0.0")
include OAuth::Helper
setup do
include OAuth::Helper
setup do
- stub_request(:get, "http://api.hostip.info/country.php?ip=127.0.0.1")
end
def test_oauth10_web_app
end
def test_oauth10_web_app
def setup
I18n.locale = "en"
def setup
I18n.locale = "en"
- stub_request(:get, "http://api.hostip.info/country.php?ip=127.0.0.1")
fixtures :users, :user_roles
setup do
fixtures :users, :user_roles
setup do
- stub_request(:get, "http://api.hostip.info/country.php?ip=127.0.0.1")
- stub_request(:get, "http://api.hostip.info/country.php?ip=127.0.0.1")
url = "https://www.gravatar.com/avatar/#{hash}?d=404"
stub_request(:get, url).and_return(:status => status, :body => body)
end
url = "https://www.gravatar.com/avatar/#{hash}?d=404"
stub_request(:get, url).and_return(:status => status, :body => body)
end
+
+ def stub_signup_requests
+ # Controller tests and integration tests use different IPs
+ stub_request(:get, "http://api.hostip.info/country.php?ip=0.0.0.0")
+ stub_request(:get, "http://api.hostip.info/country.php?ip=127.0.0.1")
+ end