Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test/do declaration style testing to ActiveSupport::TestCase [D…
…HH via Jay Fields]
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f74ba37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. This is something I had done in my tests that looks somewhat similar. Only that mine can have “unimplemented” tests.
f74ba37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for underscorizing the test names? doing the following is legal and more readable:
@
test_name = “test #{name}”.to_sym
@
With the current implementation, a test like:
@
test “User’s should return [:a, :b] on #to_book?”
@
(totally contrived) would produce a method like:
@
“test_User’s_should_return_[:a,:b]on#tobook?”
@
instead of
@
test User’s should return [:a, :b] on #to_book?"
@
f74ba37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, no idea how to format code blocks in github comments :-/
f74ba37
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tammer: I learned that trick from you in shoulda, you nut.