This project is archived and is in readonly mode.
Added select method tests to form_helper_test.rb
-
James B. Byrne
Added a git patch-format diff. jbb-2096-form-helper-test-select.diff
-
Jaime Bellmyer
I think the patch needs to be updated with an e-mail address. I received this message when I tried to apply it per lighthouse instructions:
rails>git am < ../../form_helper_test_select.diff Patch does not have a valid e-mail address.I was able to read the diff file, however, and I did notice one change that needs to be made. The select methods called in the test are passing hashes of options. The order of a hash is not guaranteed, therefore you're not guaranteed that the expected string will match. This test could very well fail on other systems for this reason. Passing in a two dimensional array will guarantee that these test run and pass predictably, like so:
assert_dom_equal(expected, select(:post, :title, [ ['OPTion Two','OPT2'], ['OPTion One','OPT1'] ]Once these things are fixed, I think this will be a very useful patch.
-
James B. Byrne
- Tag changed from actionview, tests to actionview, patch, tests
Thanks. I will make the recommended changes and resubmit. Sorry about the email address. I switched hosts and did not have my laptop fully configured for git.
-
James B. Byrne
Try this one instead.
-
James B. Byrne
Wrong patch file.
-
James B. Byrne
This one should work.
-
Jaime Bellmyer
this looks great! +1 from me. The tests make sense for shoring up rails, and they pass.
-
Santiago Pastorino
- State changed from new to open
- Importance changed from to
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale
