Skip to content

Commit b95f1ed

Browse files
committed
ability to test against an edge version of jQuery
simply put jQuery in "test/public/test/jquery.js" and select "edge" in the header
1 parent b4cd9c3 commit b95f1ed

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
test/public/vendor/rails.js
1+
test/public/vendor/jquery.js
22
*.swp
33
*.swo
44
.#*

test/server.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ def jquery_link version
1313
end
1414

1515
def jquery_src
16-
"http://code.jquery.com/jquery-#{params[:version]}.js"
16+
if params[:version] == 'edge' then "/vendor/jquery.js"
17+
else "http://code.jquery.com/jquery-#{params[:version]}.js"
18+
end
1719
end
1820

1921
def test *names

test/views/index.erb

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
jquery-ujs test
77
<%= jquery_link '1.4.3' %>
88
<%= jquery_link '1.4.4' %>
9+
<%= jquery_link 'edge' if File.exist?(settings.root + '/public/vendor/jquery.js') %>
910
</h1>
1011
<h2 id="qunit-banner"></h2>
1112
<h2 id="qunit-userAgent"></h2>

0 commit comments

Comments
 (0)