Skip to content

Commit

Permalink
ability to test against an edge version of jQuery
Browse files Browse the repository at this point in the history
simply put jQuery in "test/public/test/jquery.js"
and select "edge" in the header
  • Loading branch information
mislav committed Jan 7, 2011
1 parent b4cd9c3 commit b95f1ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
test/public/vendor/rails.js
test/public/vendor/jquery.js
*.swp
*.swo
.#*
Expand Down
4 changes: 3 additions & 1 deletion test/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ def jquery_link version
end

def jquery_src
"http://code.jquery.com/jquery-#{params[:version]}.js"
if params[:version] == 'edge' then "/vendor/jquery.js"
else "http://code.jquery.com/jquery-#{params[:version]}.js"
end
end

def test *names
Expand Down
1 change: 1 addition & 0 deletions test/views/index.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
jquery-ujs test
<%= jquery_link '1.4.3' %>
<%= jquery_link '1.4.4' %>
<%= jquery_link 'edge' if File.exist?(settings.root + '/public/vendor/jquery.js') %>
</h1>
<h2 id="qunit-banner"></h2>
<h2 id="qunit-userAgent"></h2>
Expand Down

0 comments on commit b95f1ed

Please sign in to comment.