forked from DarthFubuMVC/fubumvc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added the serenityrunner jasmine run [file] command for CI integration
- Loading branch information
1 parent
174f62f
commit 254b68c
Showing
10 changed files
with
188 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using FubuCore.CommandLine; | ||
|
||
namespace Serenity.Jasmine | ||
{ | ||
[CommandDescription("Opens up a web browser application to browse and execute Jasmine specifications", | ||
Name = "jasmine")] | ||
public class JasmineCommand : FubuCommand<JasmineInput> | ||
{ | ||
public override bool Execute(JasmineInput input) | ||
{ | ||
// TODO -- tighten up the defensive programming against bad input | ||
var runner = new JasmineRunner(input); | ||
|
||
if (input.Mode == JasmineMode.interactive) | ||
{ | ||
runner.OpenInteractive(); | ||
} | ||
|
||
if (input.Mode == JasmineMode.run) | ||
{ | ||
if (!runner.RunAllSpecs()) | ||
{ | ||
Console.WriteLine("any key will do"); | ||
Console.ReadLine(); | ||
throw new ApplicationException("Jasmine specs failed!"); | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.