Skip to content

Commit 0de22ea

Browse files
Make test server accessible outside of localhost and set X-UA-Compatible automatically.
1 parent f499614 commit 0de22ea

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

test.new/server.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ class UnitTests < Sinatra::Application
1111
set :root, PWD
1212
set :public_folder, PWD.join('static')
1313

14+
# By default, the server is only reachable locally. We change this so that
15+
# we can start the server on one machine and then run tests from another.
16+
set :bind, '0.0.0.0'
17+
1418
PATH_TO_PROTOTYPE = PWD.join('..', 'dist', 'prototype.js')
1519

1620
unless PATH_TO_PROTOTYPE.file?
@@ -19,7 +23,6 @@ class UnitTests < Sinatra::Application
1923

2024
PATH_TO_TEST_JS = PWD.join('tests')
2125

22-
2326
SUITES = []
2427

2528
PATH_TO_TEST_JS.each_entry do |e|
@@ -37,6 +40,10 @@ class UnitTests < Sinatra::Application
3740
SUITES_WITH_VIEWS << basename
3841
end
3942

43+
after do
44+
headers('X-UA-Compatible' => 'IE=edge')
45+
end
46+
4047

4148
def self.get_or_post(url, &block)
4249
get(url, &block)

0 commit comments

Comments
 (0)