Skip to content

Commit

Permalink
Fix broken blog post link in README (#32)
Browse files Browse the repository at this point in the history
* Fix broken blog post link in README

* Fix broken `Minitest::Mock#expect` usage

In GitHub Actions, there were failing tests due to `ArgumentError`
getting thrown whenever `test/mock/rails.rb:131` was getting called. I
believe this is due to how Ruby started interpreting implicit/explicit
hash arguments, so this commit explicitly wraps the return value of the
mock in a hash.

* Retrigger GitHub Actions

For some reason an extra check showed up that no longer exists. Hoping
this fixes that.
  • Loading branch information
nshki authored Nov 6, 2022
1 parent cb20b07 commit b7dc324
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ This example config only runs Chusaku if `routes.rb` was modified.
## Development

Read the blog post explaining how the gem works at a high level:
https://nshki.com/chusaku-a-controller-annotation-gem/.
https://nshki.com/chusaku-a-controller-annotation-gem.

After checking out the repo, run `bin/setup` to install dependencies. Then, run
`bundle exec rake test` to run the tests. You can also run `bin/console` for an
Expand Down
2 changes: 1 addition & 1 deletion test/mock/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def mock_route(controller:, action:, verb:, path:, name:, defaults: {})
return if @@route_allowlist.any? && @@route_allowlist.index("#{controller}##{action}").nil?

route = Minitest::Mock.new
route.expect(:defaults, controller: controller, action: action, **defaults)
route.expect(:defaults, {controller: controller, action: action, **defaults})
route.expect(:verb, verb)
route_path = Minitest::Mock.new

Expand Down

0 comments on commit b7dc324

Please sign in to comment.