If JasmineRails::OfflineAssetPaths.disabled is true, then the method is meant to shortcut and run the original super method. This gives an error like:
ActionView::Template::Error: wrong number of arguments (given 3, expected 1..2)
We found this issue after updating Rails from 5.0.0.1 to 5.0.1 (see https://github.com/alphagov/government-frontend/pull/439). Before this update the Minitests rake task ran before the spec:javascript one. As of 5.0.1 Minitest runs on the at_exit hook, meaning it always runs after Jasmine does.
The JasmineRails::OfflineAssetPaths monkey patch of
compute_asset_path
has a Rails 3 signature: https://github.com/searls/jasmine-rails/blob/master/lib/jasmine_rails/offline_asset_paths.rb#L9This was updated from 3 arguments to 2 in Rails 4: https://apidock.com/rails/ActionView/AssetPaths/compute_public_path vs https://apidock.com/rails/ActionView/Helpers/AssetUrlHelper/compute_asset_path
If JasmineRails::OfflineAssetPaths.disabled is true, then the method is meant to shortcut and run the original super method. This gives an error like:
We found this issue after updating Rails from 5.0.0.1 to 5.0.1 (see https://github.com/alphagov/government-frontend/pull/439). Before this update the Minitests rake task ran before the
spec:javascript
one. As of 5.0.1 Minitest runs on the at_exit hook, meaning it always runs after Jasmine does.Identified mostly by @h-lame