Skip to content

Commit

Permalink
Fixes rubberduck-vba#1711 to run module-specific test methods, for ea…
Browse files Browse the repository at this point in the history
…ch module
  • Loading branch information
ThunderFrame committed Jun 6, 2016
1 parent ccd6225 commit e24e551
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 e24e551

Please sign in to comment.