Profile
Achievement
tjstankus's Recent SnippetsTagged rails
- All /
« Prev 1 Next »
fixture_file_upload is another nifty Rails testing feature. It allows you to create "MIME-encoded content that would normally be uploaded by a browser input field." (Part in quotes straight from Agile Web Development with Rails, v2). Put your files t...
3
1670
posted 17 years ago by tjstankus
The key here is display:none being in the style attribute of the affected div. It will not work if it's in a separate CSS file.
6
1023
posted 18 years ago by tjstankus
A fairly DRY way to test for required attributes of a model. It's sort of an alternative to fixtures. It breaks the one-assertion-per-test rule that some people favor. Drop in your unit test and edit as necessary.
A better (yet not quite perfect)...
3
976
posted 18 years ago by tjstankus