diff --git a/Gemfile b/Gemfile index 757f2887ae169854f0deaca58fc52d2a310cf1be..82291f0bc7558ad8393cbb9becac11a9521af114 100644 --- a/Gemfile +++ b/Gemfile @@ -309,7 +309,7 @@ group :development, :test do gem "cucumber-rails", "1.5.0", require: false # Jasmine (client side application tests (JS)) - gem "jasmine", "2.8.0" + gem "jasmine", "3.1.0" gem "jasmine-jquery-rails", "2.0.3" gem "rails-assets-jasmine-ajax", "3.3.1", source: "https://rails-assets.org" gem "sinon-rails", "1.15.0" diff --git a/Gemfile.lock b/Gemfile.lock index c88df37c50ea6f490521086b22871c22af557915..6a4819be0439b21975e229627ca45cde9b07e338 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -315,12 +315,12 @@ GEM railties (>= 3.0.0) idn-ruby (0.1.0) ipaddress (0.8.3) - jasmine (2.8.0) - jasmine-core (>= 2.8.0, < 3.0.0) + jasmine (3.1.0) + jasmine-core (= 3.1.0) phantomjs rack (>= 1.2.1) rake - jasmine-core (2.8.0) + jasmine-core (3.1.0) jasmine-jquery-rails (2.0.3) jquery-rails (4.3.1) rails-dom-testing (>= 1, < 3) @@ -530,7 +530,7 @@ GEM rails-assets-favico.js (0.3.10) rails-assets-fine-uploader (5.13.0) rails-assets-highlightjs (9.12.0) - rails-assets-jasmine (2.8.0) + rails-assets-jasmine (2.99.2) rails-assets-jasmine-ajax (3.3.1) rails-assets-jasmine (~> 2) rails-assets-jquery (3.2.1) @@ -807,7 +807,7 @@ DEPENDENCIES handlebars_assets (= 0.23.2) http_accept_language (= 2.1.1) i18n-inflector-rails (= 1.0.7) - jasmine (= 2.8.0) + jasmine (= 3.1.0) jasmine-jquery-rails (= 2.0.3) jquery-rails (= 4.3.1) js-routes (= 1.4.3) diff --git a/config/environments/test.rb b/config/environments/test.rb index 8ba0131176d98f14005bea74ab70e3e7c513c94d..26db9c226ddd2bd0b9d6844f143b0e38d7fb0a89 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -32,6 +32,8 @@ Rails.application.configure do color_themes/original/desktop.css color_themes/dark_green/desktop.css color_themes/original/mobile.css + jasmine-load-all.js + jasmine-jquery.js ] # Show full error reports and disable caching. diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml index cec4333070de79c6d45abf8bdbf2f9bff7564768..cac5e7fcbe9ed64a372295739d2e2a6b2e004565 100644 --- a/spec/javascripts/support/jasmine.yml +++ b/spec/javascripts/support/jasmine.yml @@ -80,3 +80,6 @@ spec_dir: spec/javascripts rack_options: Host: '0.0.0.0' + +# TODO: refactor tests, they shouldn't fail when they are run in a random order! +random: false