Skip to content

Commit

Permalink
back to normal document ready and use https in fakeweb tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darkhelmet committed Nov 4, 2010
1 parent 9531a7b commit 7eb7ad0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/rack/gist.rb
Expand Up @@ -114,7 +114,8 @@ def jquery_link
def jquery_helper
<<-EOJQ
<script type='text/javascript'>
setTimeout(function() {
//<![CDATA[
$(document).ready(function() {
$('.rack-gist').each(function() {
var div = this;
var url = '/gist.github.com/' + $(this).attr('gist-id');
Expand All @@ -128,7 +129,8 @@ def jquery_helper
cache: true
});
});
}, 500);
});
//]]>
</script>
EOJQ
end
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Expand Up @@ -22,8 +22,8 @@

# Disallow web access
FakeWeb.allow_net_connect = false
FakeWeb.register_uri(:get, 'http://gist.github.com/348301.js', :body => File.read(File.join(File.dirname(__FILE__), 'full-gist.js')), :content_type => 'text/javascript; charset=utf-8')
FakeWeb.register_uri(:get, 'http://gist.github.com/348301.js?file=example.pig', :body => File.read(File.join(File.dirname(__FILE__), 'partial-gist.js')), :content_type => 'text/javascript; charset=utf-8')
FakeWeb.register_uri(:get, 'https://gist.github.com/348301.js', :body => File.read(File.join(File.dirname(__FILE__), 'full-gist.js')), :content_type => 'text/javascript; charset=utf-8')
FakeWeb.register_uri(:get, 'https://gist.github.com/348301.js?file=example.pig', :body => File.read(File.join(File.dirname(__FILE__), 'partial-gist.js')), :content_type => 'text/javascript; charset=utf-8')

Spec::Matchers.define :have_html_tag do |tag|
chain :count do |count|
Expand Down

0 comments on commit 7eb7ad0

Please sign in to comment.