Closed mikemerritt closed 8 years ago
After further digging it appears to be caused by this line. https://github.com/searls/jasmine-rails/blob/master/lib/jasmine_rails/offline_asset_paths.rb#L10
Changing it to if ::Rails::VERSION::MAJOR >= 4
allows my tests to run but also generates a whole slew of depreciation warnings. A workaround but hardly a proper solution.
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <module:OfflineAssetPaths> at /Users/mike/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/jasmine-rails-a0968df653eb/lib/jasmine_rails/offline_asset_paths.rb:13)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from block in <module:OfflineAssetPaths> at /Users/mike/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/jasmine-rails-a0968df653eb/lib/jasmine_rails/offline_asset_paths.rb:16)
DEPRECATION WARNING: ActionDispatch::IntegrationTest HTTP request methods will accept only
the following keyword arguments in future Rails versions:
params, headers, env, xhr
Examples:
get '/profile',
params: { id: 1 },
headers: { 'X-Extra-Header' => '123' },
env: { 'action_dispatch.custom' => 'custom' },
xhr: true
. (called from get_spec_runner at /Users/mike/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/jasmine-rails-a0968df653eb/lib/jasmine_rails/runner.rb:61)
Running `"phantomjs" "" "/Users/mike/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/bundler/gems/jasmine-rails-a0968df653eb/lib/jasmine_rails/../assets/javascripts/jasmine-runner.js" "file:///Users/mike/Code/xxxxxx/xxxxxx/tmp/jasmine/runner.html?spec="`
Running: file:///Users/mike/Code/xxxxxx/xxxxxx/tmp/jasmine/runner.html?spec=
Starting...
Finished
-----------------
0 specs, 0 failures in 0.001s.
ConsoleReporter finished
Same issue here - Rails 5
Same here with Rails 5.0.0.beta3
same problem here too
Thanks for this thread. I'm not ignoring you, I've just been putting off this issue for too long, which is particularly problematic as Rails 5's release is certainly imminent.
Now that Rails 5 works, I need help clearing the deprecation warnings. I spent a few hours yesterday reworking jasmine-rails build to execute all the supported versions of rails while adding rails 5. That means there should be enough of a harness in place for someone to take a stab at clearing the deprecation warnings without breaking too much.
Let's track this in #187 from here on
I'm attempting to test React components in Rails but there seem to be some issues with jasmine-rails and Rails 5.0. Running
rake spec:javascripts --trace
returns the following error.I put together an example application here: https://github.com/mikemerritt/rails5-react-jasmine
I've tried downgrading to older sprockets versions with no luck.