Profile
Achievement

tjstankus's Recent Snippets
- 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
1772
posted 18 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
1104
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
1056
posted 18 years ago by tjstankus