This file contains 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
# Add this to test/test_helper.rb | |
# Allow http digest authentication in functional tests, based on https://gist.github.com/1282275 | |
# Call authenticate_with_http_digest(user, realm, digest) or authenticate_with_http_digest(user, realm, password, false) before you perform a request | |
class ActionController::TestCase | |
require 'digest/md5' | |
def authenticate_with_http_digest(user, realm, password, password_is_ha1 = true) | |
ActionController::Base.class_eval { include ActionController::Testing } | |
This file contains 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
class DOMNodeList | |
include Enumerable | |
def each | |
length.times { |i| yield item(i) } | |
end | |
end | |
doc = webView.mainFrameDocument | |
p document.querySelector('meta[name=viewport][content*=width]') |
This file contains 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
Fingertips is a high-end design and development team for web, iPhone, iPad, and Mac OS X. |