Skip to content

Commit 2daeca8

Browse files
committed
Fix goof with vbe design mode, fixes #4370
1 parent 72f1fe6 commit 2daeca8

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

Rubberduck.Core/UI/Command/MenuItems/RunAllTestsCommandMenuItem.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,5 @@ public RunAllTestsCommandMenuItem(RunAllTestsCommand command)
1515
public override int DisplayOrder => (int)UnitTestingMenuItemDisplayOrder.RunAllTests;
1616
public override Image Image => Resources.CommandBarIcons.AllLoadedTests;
1717
public override Image Mask => Resources.CommandBarIcons.AllLoadedTestsMask;
18-
19-
public override bool EvaluateCanExecute(RubberduckParserState state)
20-
{
21-
return state != null && state.Status >= ParserState.ResolvedDeclarations && state.Status < ParserState.Error;
22-
}
2318
}
2419
}

Rubberduck.Main/Root/RubberduckIoCInstaller.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ public void Install(IWindsorContainer container, IConfigurationStore store)
153153

154154
container.Register(Component.For<HotkeyFactory>()
155155
.LifestyleSingleton());
156-
container.Register(Component.For<ITestEngine>().ImplementedBy<TestEngine>()
156+
container.Register(Component.For<ITestEngine>()
157+
.ImplementedBy<TestEngine>()
157158
.LifestyleSingleton());
158159

159160
var assembliesToRegister = AssembliesToRegister().ToArray();

Rubberduck.UnitTesting/UnitTesting/TestEngine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ internal class TestEngine : ITestEngine
3737
private readonly List<TestMethod> LastRun = new List<TestMethod>();
3838
private readonly Dictionary<TestOutcome, List<TestMethod>> resultsByOutcome = new Dictionary<TestOutcome, List<TestMethod>>();
3939
public IEnumerable<TestMethod> Tests { get; private set; }
40-
public bool CanRun => AllowedRunStates.Contains(_state.Status);// && !_vbe.IsInDesignMode;
40+
public bool CanRun => AllowedRunStates.Contains(_state.Status) && _vbe.IsInDesignMode;
4141
public bool CanRepeatLastRun => LastRun.Any();
4242

4343
private bool refreshBackoff;
@@ -126,7 +126,7 @@ public void RepeatLastRun()
126126

127127
private void RunInternal(IEnumerable<TestMethod> tests)
128128
{
129-
if (!CanRun || _vbe.IsInDesignMode)
129+
if (!CanRun)
130130
{
131131
return;
132132
}

0 commit comments

Comments
 (0)