Skip to content
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

Rule S2187: Test class should contain test methods #667

Closed
fmallet opened this issue Aug 8, 2017 · 4 comments
Closed

Rule S2187: Test class should contain test methods #667

fmallet opened this issue Aug 8, 2017 · 4 comments
Assignees
Milestone

Comments

@fmallet
Copy link
Contributor

fmallet commented Aug 8, 2017

Implements RSPEC-2187

@fmallet fmallet added this to the 6.4 milestone Aug 8, 2017
@Evangelink Evangelink changed the title Rule: TestCases should contain tests Rule S2187: TestCases should contain tests Aug 8, 2017
@Evangelink Evangelink self-assigned this Aug 9, 2017
@Evangelink Evangelink changed the title Rule S2187: TestCases should contain tests Rule S2187: Test class should contain test methods Aug 9, 2017
@sm-g
Copy link

sm-g commented Sep 17, 2017

@fmallet testfixute class may contain only TestCaseSource and Theory or it may be abstract (for NUnit).

Also I have suggestion for another rule: to check that there is no public methods in TestFixture class which is not tests (this may be after forgetting to add [Test] after refactoring of tests).

@Evangelink
Copy link
Contributor

@sm-g Thanks for the feedback. I have created a ticket to improve the rule to handle these cases (#786). Also thanks for the TestCaseSource attribute, never used it so some other rules need to be improved too (#785).

@sm-g
Copy link

sm-g commented Sep 19, 2017

@Evangelink did you forget to mention that

[TestFixture]
public abstract class TestsBase {
}

and

[TestFixture]
public class Tests{

[Theory]
public void Test(...){}
}
}

also valid?

@Evangelink
Copy link
Contributor

Gosh! Thanks for raising the hand! I have updated the tickets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants