-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
Tidy up tests #290
Tidy up tests #290
Conversation
Any thoughts on this? (My goal is to make it easier to know where to add new tests, by making the naming of existing ones more consistent) |
@RST-J do you think this is a good idea? Or can you suggest any changes? |
I'll have a look some time soon. I think this needs some time to think about. In general I like your idea and aim very much. |
@@ -11,18 +11,28 @@ def test_schema_from_file | |||
refute_valid schema_fixture_path('good_schema_1.json'), { "a" => "bad" } | |||
end | |||
|
|||
def test_data_from_file | |||
def test_data_from_file_v3 |
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.
Shouldn't this preferably called data_from_file_v3_test
according to the new naming scheme? And all other tests in here also then.
P.S.: Or, I guess, only classes get the suffix 'Test' and test methods have it as prefix. That's also fine too me, consistency ist the point, so 👍
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.
Test unit only runs methods starting with test_
- so this is the correct method name. I've also checked the other test classes and they all seem to have correct test method names
Not sooo soon, but finally. I think it's fine. 👍 |
To avoid unintended side-effects
I've tidied up a few things in the test directory that were annoying me:
FooTest
(notTestFoo
,FooTests
or justFoo
)test_helper.rb
out of the/test
directory and into/test/support