Skip to content

Commit

Permalink
Merge pull request rubberduck-vba#1714 from ThunderFrame/next
Browse files Browse the repository at this point in the history
Fixes rubberduck-vba#1711 to run module-specific test methods, for each module
  • Loading branch information
retailcoder committed Jun 6, 2016
2 parents ccd6225 + e24e551 commit f39821b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion RetailCoder.VBE/UnitTesting/TestEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ public void Run(IEnumerable<TestMethod> tests)
var testInitialize = module.Key.FindTestInitializeMethods(_state).ToList();
var testCleanup = module.Key.FindTestCleanupMethods(_state).ToList();

var moduleTestMethods = testMethods
.Where(test => test.QualifiedMemberName.QualifiedModuleName.ComponentName == module.Key.ComponentName);

Run(module.Key.FindModuleInitializeMethods(_state));
foreach (var test in testMethods)
foreach (var test in moduleTestMethods)
{
// no need to run setup/teardown for ignored tests
if (test.Declaration.Annotations.Any(a => a.AnnotationType == AnnotationType.IgnoreTest))
Expand Down

0 comments on commit f39821b

Please sign in to comment.