Skip to content

Instantly share code, notes, and snippets.

@jamesrcounts
Created February 14, 2013 22:01
Show Gist options
  • Select an option

  • Save jamesrcounts/4956790 to your computer and use it in GitHub Desktop.

Select an option

Save jamesrcounts/4956790 to your computer and use it in GitHub Desktop.
A MightyMoose reporter suitable for front loading.
using System.Linq;
using ApprovalTests.Core;
namespace ApprovalTests.Reporters
{
public class AutoTestReporter : IEnvironmentAwareReporter
{
public static readonly AutoTestReporter INSTANCE = new AutoTestReporter();
public void Report(string approved, string received)
{
}
public bool IsWorkingInThisEnvironment(string forFile)
{
return Approvals.CurrentCaller.NonLambdaCallers
.Any(c => c.Class.Assembly.GetName().Name.StartsWith("AutoTest.TestRunners"));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment