Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3
Provides Rails 5 compatible testing methods for gradual migration from Rails 4 to 5.
License
r7kamura/rails_kwargs_testing
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Provides Rails 5 compatible testing methods for gradual migration from Rails 4 to 5.
Add this line to your application's Gemfile:
gem"rails_kwargs_testing"
And then execute:
bundle
Or install it yourself as:
geminstallrails_kwargs_testing
Prepend RailsKwargsTesting::ControllerMethods. Supported options are:
- :flash
- :format
- :params
- :session
- :xhr
- :as
classArticlesControllerTest < ::ActionController::TestCaseprepend ::RailsKwargsTesting::ControllerMethodsdeftest_create# `post :create, name: "Hello, World!"` in Rails 4post:create,params:{name:"Hello, World!"}assert_equal200,response.statusendend
RSpec.describeArticlesControllerdoprependRailsKwargsTesting::ControllerMethodsdescribe"#create"dosubjectdo# `post :create, name: "Hello, World!"` in Rails 4post:create,params:{name:"Hello, World!"}endit{is_expected.toeq200}endend
Prepend RailsKwargsTesting::RequestMethods. Supported options are:
- :env
- :headers
- :params
classCreateArticleTest <ActionDispatch::IntegrationTestprepend ::RailsKwargsTesting::RequestMethodsdeftest_create_article# `post "/articles", name: "Hello, World!"` in Rails 4post"/articles",params:{name:"Hello, World!"}assert_equal200,response.statusendend
RSpec.describe"POST /articles"doprependRailsKwargsTesting::RequestMethodssubjectdo# `post "/articles", name: "Hello, World!"` in Rails 4post"/articles",params:{name:"Hello, World!"}endit{is_expected.toeq200}end
Bug reports and pull requests are welcome on GitHub athttps://github.com/r7kamura/rails_kwargs_testing.
The gem is available as open source under the terms of theMIT License.
About
Provides Rails 5 compatible testing methods for gradual migration from Rails 4 to 5.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
