-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Limit number of test classes in file to one #1779
Comments
Implements realm#1779 (Limit number of QuickSpecs in file to one).
Should this also be applied to |
@marcelofabri I'm not sure, but I more inclined to say no. One might want to test the system under test with different parameters and a single pair of Using Quick, these are different setups would live inside the same QuickSpec class, but nested under |
But then one could do the setup in each test or even split the |
IMO setup should never happen inside the test. Not when using Quick/Cedar/etc.. at least. The 'it' block should be only for verifying the expectation. I can either change this rule to cover XCTestCase or create a new (and similar rule) for XCTestCase. |
PR updated :-) |
Implements realm#1779 (Limit number of QuickSpecs in file to one).
Closed in #1780 |
Implements #1779 (Limit number of QuickSpecs in file to one).
One of the things I like the most about Quick is the possibility to isolate scenarios in nested blocks to better describe the behavior of the system under test.
As result, rare are the cases were one would need to implement two or more QuickSpecs in the same test file. A single QuickSpec per file is enough.
rule request, single quick spec per file, opt-in
The text was updated successfully, but these errors were encountered: