rails-controller-testing icon indicating copy to clipboard operation
rails-controller-testing copied to clipboard

Rails 6.1 compatibility

Open voxik opened this issue 4 years ago • 0 comments

Testing against Rails 6.0, there are fired depracation warnings:

.DEPRECATION WARNING: render file: should be given the absolute path to a file (called from render_file_relative_path at /home/travis/build/rails/rails-controller-testing/test/dummy/app/controllers/template_assertions_controller.rb:23)

DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: test/dummy/README.rdoc (called from render_file_relative_path at /home/travis/build/rails/rails-controller-testing/test/dummy/app/controllers/template_assertions_controller.rb:23)

DEPRECATION WARNING: Rendering actions with '.' in the name is deprecated: test/dummy/README.rdoc (called from render_file_relative_path at /home/travis/build/rails/rails-controller-testing/test/dummy/app/controllers/template_assertions_controller.rb:23)

.DEPRECATION WARNING: render file: should be given the absolute path to a file (called from render_file_relative_path at /home/travis/build/rails/rails-controller-testing/test/dummy/app/controllers/template_assertions_controller.rb:23)

..........................DEPRECATION WARNING: render file: should be given the absolute path to a file (called from render_file_relative_path at /home/travis/build/rails/rails-controller-testing/test/dummy/app/controllers/template_assertions_controller.rb:23)

...DEPRECATION WARNING: render file: should be given the absolute path to a file (called from render_file_relative_path at /home/travis/build/rails/rails-controller-testing/test/dummy/app/controllers/template_assertions_controller.rb:23)

...............

Finished in 0.104068s, 442.0196 runs/s, 1210.7494 assertions/s.

46 runs, 126 assertions, 0 failures, 0 errors, 0 skips

Testing against Rails 6.1, the same test cases fail such as:

TemplateAssertionsControllerTest#test_file_with_relative_path_success:
ArgumentError: `render file:` should be given the absolute path to a file. '/test/dummy/README.rdoc' was given instead
    app/controllers/template_assertions_controller.rb:23:in `render_file_relative_path'
rails test /builddir/build/BUILD/rails-controller-testing-1.0.5/usr/share/gems/gems/rails-controller-testing-1.0.5/test/controllers/template_assertions_test.rb:15

voxik avatar Feb 08 '21 22:02 voxik