vendor/assets/javascripts/jasmine-jquery.js in jasmine-jquery-rails-2.0.2 vs vendor/assets/javascripts/jasmine-jquery.js in jasmine-jquery-rails-2.0.3
- old
+ new
@@ -1,9 +1,9 @@
/*!
Jasmine-jQuery: a set of jQuery helpers for Jasmine tests.
-Version 2.0.2
+Version 2.1.0
https://github.com/velesin/jasmine-jquery
Copyright (c) 2010-2014 Wojciech Zawistowski, Travis Jeffery
@@ -126,12 +126,12 @@
cache: false,
url: url,
success: function (data, status, $xhr) {
htmlText = $xhr.responseText
}
- }).fail(function () {
- throw new Error('Fixture could not be loaded: ' + url + ' (status: ' + status + ', message: ' + errorThrown.message + ')')
+ }).fail(function ($xhr, status, err) {
+ throw new Error('Fixture could not be loaded: ' + url + ' (status: ' + status + ', message: ' + err.message + ')')
})
var scripts = $($.parseHTML(htmlText, true)).find('script[src]') || [];
scripts.each(function(){
@@ -141,12 +141,12 @@
dataType: 'script',
url: $(this).attr('src'),
success: function (data, status, $xhr) {
htmlText += '<script>' + $xhr.responseText + '</script>'
},
- error: function (jqXHR, status, errorThrown) {
- throw new Error('Script could not be loaded: ' + scriptSrc + ' (status: ' + status + ', message: ' + errorThrown.message + ')')
+ error: function ($xhr, status, err) {
+ throw new Error('Script could not be loaded: ' + scriptSrc + ' (status: ' + status + ', message: ' + err.message + ')')
}
});
})
self.fixturesCache_[relativeUrl] = htmlText;
@@ -253,12 +253,12 @@
dataType: 'json',
url: url,
success: function (data) {
self.fixturesCache_[relativeUrl] = data
},
- error: function (jqXHR, status, errorThrown) {
- throw new Error('JSONFixture could not be loaded: ' + url + ' (status: ' + status + ', message: ' + errorThrown.message + ')')
+ error: function ($xhr, status, err) {
+ throw new Error('JSONFixture could not be loaded: ' + url + ' (status: ' + status + ', message: ' + err.message + ')')
}
})
}
jasmine.JSONFixtures.prototype.proxyCallTo_ = function (methodName, passedArguments) {
@@ -808,6 +808,5 @@
window.getJSONFixture = function (url) {
return jasmine.getJSONFixtures().proxyCallTo_('read', arguments)[url]
}
}(window, window.jasmine, window.jQuery);
-