-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
187 changed files
with
355 additions
and
33,797 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# How to Contribute | ||
|
||
First of all, thank you for wanting to contribute to Machine.Specifications! We really appreciate all the awesome support we get from our community. We want to keep it as easy as possible for you to contribute changes that make Machine.Specifications better for you. There are a few guidelines that we need contributors to follow so that we can all work together happily. | ||
|
||
## Preparation | ||
|
||
Before starting work on a new bug, feature, etc. ensure that an [issue](https://github.com/machine/machine.specifications/issues) has been raised. Indicate your intention to work on the issue by writing a comment against it. This will prevent duplication of effort. If the issue is a new feature, it's usually best to propose a design in the issue comments. |
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,4 @@ | ||
source 'http://rubygems.org' | ||
gem 'rake' | ||
gem 'albacore', '~> 1.0.rc' | ||
gem 'configatron' |
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,23 @@ | ||
GEM | ||
remote: http://rubygems.org/ | ||
specs: | ||
albacore (1.0.0.rc.2) | ||
nokogiri (~> 1.5) | ||
rake | ||
rubyzip (~> 1.0) | ||
configatron (2.13.0) | ||
yamler (>= 0.1.0) | ||
mini_portile (0.5.2) | ||
nokogiri (1.6.1-x86-mingw32) | ||
mini_portile (~> 0.5.0) | ||
rake (10.1.1) | ||
rubyzip (1.1.0) | ||
yamler (0.1.0) | ||
|
||
PLATFORMS | ||
x86-mingw32 | ||
|
||
DEPENDENCIES | ||
albacore (~> 1.0.rc) | ||
configatron | ||
rake |
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,57 @@ | ||
# How to build | ||
|
||
These instructions are *only* for building with Rake, which includes compilation, test execution and packaging. This is the simplest way to build. | ||
|
||
You can also build the solution using Visual Studio 2012 or later. | ||
|
||
*Don't be put off by the prerequisites!* It only takes a few minutes to set them up and only needs to be done once. If you haven't used [Rake](http://rake.rubyforge.org/ "RAKE -- Ruby Make") before then you're in for a real treat! | ||
|
||
At the time of writing the build is only confirmed to work on Windows using the Microsoft .NET framework. | ||
|
||
## Prerequisites | ||
|
||
1. Ensure you have .NET framework 3.5 and 4.0/4.5 installed. | ||
|
||
1. Install Ruby 2.0.0 or later. | ||
|
||
For Windows we recommend using [RubyInstaller](http://rubyinstaller.org/) and selecting 'Add Ruby executables to your PATH' when prompted. For alternatives see the [Ruby download page](http://www.ruby-lang.org/en/downloads/). Be sure to use the 32 bit version. | ||
|
||
1. Install Ruby DevKit for 2.0.0 or later. | ||
|
||
For Windows we recommend using [RubyInstaller](http://rubyinstaller.org/), follow the instructions for [DevKit](https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) . For alternatives see the [Ruby download page](http://www.ruby-lang.org/en/downloads/). Be sure to use the 32 bit version. | ||
|
||
1. Using a command prompt, install bundler: | ||
|
||
`gem install bundler` | ||
|
||
1. Install/update necessary build tools, navigate to your clone root folder and execute: | ||
|
||
`bundle install` | ||
|
||
## Building | ||
|
||
Using a command prompt, navigate to your clone root folder and execute: | ||
|
||
`rake` | ||
|
||
or use the provided build batch files. | ||
|
||
This executes the default build tasks. After the build has completed, the build artifacts will be located in `Build`. | ||
|
||
## Extras | ||
|
||
* View the full list of build tasks: | ||
|
||
`rake -T` | ||
|
||
* Run a specific task: | ||
|
||
`rake spec` | ||
|
||
* Run multiple tasks: | ||
|
||
`rake spec pack` | ||
|
||
* View the full list of rake options: | ||
|
||
`rake -h` |
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
162 changes: 81 additions & 81 deletions
162
...Specifications.Should.Specs/CatchSpecs.cs → ...achine.Specifications.Specs/CatchSpecs.cs
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 |
---|---|---|
@@ -1,82 +1,82 @@ | ||
using System; | ||
|
||
namespace Machine.Specifications.Should.Specs | ||
{ | ||
[Subject(typeof(Catch))] | ||
public class when_calling_Catch_Exception_with_an_Action | ||
{ | ||
[Subject(typeof(Catch))] | ||
public class with_a_throwing_Action | ||
{ | ||
static ArgumentException AnException; | ||
static Exception Result; | ||
|
||
Establish context = () => { AnException = new ArgumentException(); }; | ||
|
||
Because of = () => { Result = Catch.Exception(() => { throw AnException; }); }; | ||
|
||
It should_return_the_same_exception = | ||
() => Result.ShouldBeTheSameAs(AnException); | ||
} | ||
|
||
[Subject(typeof(Catch))] | ||
public class with_a_non_throwing_Action | ||
{ | ||
static string ActionSideEffect; | ||
static Exception Result; | ||
|
||
Because of = () => { Result = Catch.Exception(() => { ActionSideEffect = "hi"; }); }; | ||
|
||
It should_access_the_propety = | ||
() => ActionSideEffect.ShouldEqual("hi"); | ||
|
||
It should_return_null = | ||
() => Result.ShouldBeNull(); | ||
} | ||
} | ||
|
||
[Subject(typeof(Catch))] | ||
public class when_calling_Catch_Exception_with_a_Func | ||
{ | ||
class Dummy | ||
{ | ||
public static readonly ArgumentException AnException = new ArgumentException(); | ||
|
||
public static string ThrowingProperty | ||
{ | ||
get { throw AnException; } | ||
} | ||
|
||
public static string NonThrowingProperty | ||
{ | ||
get { return "hi"; } | ||
} | ||
} | ||
|
||
[Subject(typeof(Catch))] | ||
public class with_a_throwing_Func | ||
{ | ||
static Exception Result; | ||
|
||
Because of = () => { Result = Catch.Exception(() => Dummy.ThrowingProperty); }; | ||
|
||
It should_return_the_same_exception = | ||
() => Result.ShouldBeTheSameAs(Dummy.AnException); | ||
} | ||
|
||
[Subject(typeof(Catch))] | ||
public class with_a_non_throwing_Func | ||
{ | ||
static Exception Result; | ||
static string PropertyValue; | ||
|
||
Because of = () => { Result = Catch.Exception(() => PropertyValue = Dummy.NonThrowingProperty); }; | ||
|
||
It should_access_the_propety = | ||
() => PropertyValue.ShouldEqual("hi"); | ||
|
||
It should_return_null = | ||
() => Result.ShouldBeNull(); | ||
} | ||
} | ||
using System; | ||
|
||
namespace Machine.Specifications.Specs | ||
{ | ||
[Subject(typeof(Catch))] | ||
public class when_calling_Catch_Exception_with_an_Action | ||
{ | ||
[Subject(typeof(Catch))] | ||
public class with_a_throwing_Action | ||
{ | ||
static ArgumentException AnException; | ||
static Exception Result; | ||
|
||
Establish context = () => { AnException = new ArgumentException(); }; | ||
|
||
Because of = () => { Result = Catch.Exception(() => { throw AnException; }); }; | ||
|
||
It should_return_the_same_exception = | ||
() => Result.ShouldBeTheSameAs(AnException); | ||
} | ||
|
||
[Subject(typeof(Catch))] | ||
public class with_a_non_throwing_Action | ||
{ | ||
static string ActionSideEffect; | ||
static Exception Result; | ||
|
||
Because of = () => { Result = Catch.Exception(() => { ActionSideEffect = "hi"; }); }; | ||
|
||
It should_access_the_propety = | ||
() => ActionSideEffect.ShouldEqual("hi"); | ||
|
||
It should_return_null = | ||
() => Result.ShouldBeNull(); | ||
} | ||
} | ||
|
||
[Subject(typeof(Catch))] | ||
public class when_calling_Catch_Exception_with_a_Func | ||
{ | ||
class Dummy | ||
{ | ||
public static readonly ArgumentException AnException = new ArgumentException(); | ||
|
||
public static string ThrowingProperty | ||
{ | ||
get { throw AnException; } | ||
} | ||
|
||
public static string NonThrowingProperty | ||
{ | ||
get { return "hi"; } | ||
} | ||
} | ||
|
||
[Subject(typeof(Catch))] | ||
public class with_a_throwing_Func | ||
{ | ||
static Exception Result; | ||
|
||
Because of = () => { Result = Catch.Exception(() => Dummy.ThrowingProperty); }; | ||
|
||
It should_return_the_same_exception = | ||
() => Result.ShouldBeTheSameAs(Dummy.AnException); | ||
} | ||
|
||
[Subject(typeof(Catch))] | ||
public class with_a_non_throwing_Func | ||
{ | ||
static Exception Result; | ||
static string PropertyValue; | ||
|
||
Because of = () => { Result = Catch.Exception(() => PropertyValue = Dummy.NonThrowingProperty); }; | ||
|
||
It should_access_the_propety = | ||
() => PropertyValue.ShouldEqual("hi"); | ||
|
||
It should_return_null = | ||
() => Result.ShouldBeNull(); | ||
} | ||
} | ||
} |
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
File renamed without changes.
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
45 changes: 45 additions & 0 deletions
45
...Runners/Machine.Specifications.ConsoleRunner/Machine.Specifications.ConsoleRunner.targets
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,45 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Target Name="Default"> | ||
<ItemGroup> | ||
<ConsoleRunners Include="Item1"> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<AssemblyName>mspec-x86</AssemblyName> | ||
</ConsoleRunners> | ||
<ConsoleRunners Include="Item2"> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<PlatformTarget>x86</PlatformTarget> | ||
<AssemblyName>mspec-x86-clr4</AssemblyName> | ||
</ConsoleRunners> | ||
<ConsoleRunners Include="Item3"> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<PlatformTarget>AnyCPU</PlatformTarget> | ||
<AssemblyName>mspec-clr4</AssemblyName> | ||
</ConsoleRunners> | ||
</ItemGroup> | ||
<Copy | ||
SourceFiles="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunner.csproj" | ||
DestinationFiles="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj"/> | ||
|
||
<XmlPoke XmlInputPath="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj" | ||
Query="/ns:Project/@DefaultTargets" | ||
Value="Build" Namespaces="<Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/msbuild/2003' />"/> | ||
|
||
<XmlPoke XmlInputPath="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj" | ||
Query="//ns:AssemblyName" | ||
Value="%(ConsoleRunners.AssemblyName)" Namespaces="<Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/msbuild/2003' />"/> | ||
<XmlPoke XmlInputPath="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj" | ||
Query="//ns:TargetFrameworkVersion" | ||
Value="%(ConsoleRunners.TargetFrameworkVersion)" Namespaces="<Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/msbuild/2003' />"/> | ||
<XmlPoke XmlInputPath="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj" | ||
Query="//ns:PlatformTarget" | ||
Value="%(ConsoleRunners.PlatformTarget)" Namespaces="<Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/msbuild/2003' />"/> | ||
<MSBuild | ||
Projects="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj" | ||
Targets="Build" | ||
Properties="Configuration=$(Configuration);TrackFileAccess=$(TrackFileAccess)"/> | ||
<Delete | ||
Files="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj" /> | ||
</Target> | ||
</Project> |
Oops, something went wrong.
e5364ed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you, please, update history as well? What was changed in 0.6.2?
e5364ed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.