-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
assert_template against the same partial with different locals #3675
Comments
@luisobo is this still an issue? |
@luisobo Can you provide a test application or reproduce the issue with test-unit? |
I cannot for the life of me figure out how to make an integration test with test-unit. Anyway, it would seem to me that the issue is here:
This is going to write two values for the same key, which is why you're seeing the second only. You could fix this by only writing one assertion per test. ;) |
@steveklabnik is this considered a bug? I could try to write up a patch. I added a failing test case to illustrate the problem. |
I think so. |
I have a view like this
Then in RSpec I'm doing this:
The first expectation is failing. It says something like expected "10", found "20". It looks like it's only saving the last partial and checking all my expectations against the last one.
The second expectation is passing.
The RSpec matcher
render_template
usesassert_template
so the problem is the same there.The text was updated successfully, but these errors were encountered: