-
-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
View specs fail when view renders partial #137
Comments
Hi @nerdinand thank you for this issue, we'll take a look as soon as possible. |
|
I did some digging. For some reason the resolution of the Changing view/lib/hanami/view/rendering/partial.rb Line 26 in f8c0900
to PartialFinder.new(@view.class, @options.merge(format: :html)).find fixes the problem. I don't know what a proper fix would look like though... |
@AlfonsoUceda @jodosha Any news on this one? Would really like to set my view tests to non-pending... ;-) |
@nerdinand Can you please try with let(:exposures) { Hash[foo: 'bar', format: :html] } This works for me locally. |
@jodosha that worked for me, thanks. Even with hanami-view 1.0.1. But you have to admit it's not a very obvious thing ;). |
@nerdinand no it's not obvious, that's why we're adding it by default (see hanami/hanami#860) Thanks for getting back so quickly. |
It seems view specs fail when the tested view renders a partial, e.g.
When running the app and visiting http://localhost:2300/books/1/edit, everything works as expected:
But when running the specs:
Here's a sample application to reproduce this: bookshelf.zip
BTW, it's totally possible that I'm just holding it wrong. But this seems quite odd...
The text was updated successfully, but these errors were encountered: