Skip to content

Commit 840ab6a

Browse files
committed
Add jQuery version 1.6.3 to tests, and use it by default
1 parent ee275d1 commit 840ab6a

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

test/server.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
require 'sinatra'
22
require 'json'
33

4+
JQUERY_VERSIONS = %w[ 1.6 1.6.1 1.6.2 1.6.3 ].freeze
5+
46
use Rack::Static, :urls => ["/src"], :root => File.expand_path('..', settings.root)
57

68
helpers do
@@ -39,10 +41,14 @@ def script_tag src
3941
src = "/test/#{src}.js" unless src.index('/')
4042
%(<script src="#{src}" type="text/javascript"></script>)
4143
end
44+
45+
def jquery_versions
46+
JQUERY_VERSIONS
47+
end
4248
end
4349

4450
get '/' do
45-
params[:version] ||= '1.6.2'
51+
params[:version] ||= JQUERY_VERSIONS.last
4652
params[:cdn] ||= 'jquery'
4753
erb :index
4854
end

test/views/index.erb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@
1010
</div>
1111
<div id="jquery-version">
1212
jQuery version:
13-
<%= jquery_link '1.6' %>
14-
<%= jquery_link '1.6.1' %>
15-
<%= jquery_link '1.6.2' %>
16-
<%= jquery_link 'edge' if File.exist?(settings.root + '/public/vendor/jquery.js') %>
13+
14+
<% jquery_versions.each do |v| %>
15+
<%= ' • ' if v != jquery_versions.first %>
16+
<%= jquery_link v %>
17+
<% end %>
18+
<%= (' • ' + jquery_link('edge')) if File.exist?(settings.root + '/public/vendor/jquery.js') %>
1719
</div>
1820
<h2 id="qunit-banner"></h2>
1921
<div id="qunit-testrunner-toolbar"></div>

0 commit comments

Comments
 (0)