Skip to content

Commit

Permalink
Merge branch 'hotfix-0.6.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmarbach committed Jan 7, 2014
2 parents 4086e1f + 318e2f3 commit e5364ed
Show file tree
Hide file tree
Showing 187 changed files with 355 additions and 33,797 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ NDependOut
*.ncrunchproject

/.nuget/nuget.exe
/Build
/Distribution
/Specs
/Build/*
/Distribution/*
/Specs/*.*
/packages
install.ps1
mspec.nuspec
Misc/machine.specifications.nuspec

Source/packages/*
logs/*
.bundle/*
7 changes: 7 additions & 0 deletions CONTRIBUTING.md
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.
4 changes: 4 additions & 0 deletions Gemfile
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'
23 changes: 23 additions & 0 deletions Gemfile.lock
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
57 changes: 57 additions & 0 deletions HOW_TO_BUILD.md
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`
2 changes: 1 addition & 1 deletion README.markdown → README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ The MSpec HTML reports can show additional [Selenium](http://seleniumhq.org/)-sp

# ReSharper Integration

MSpec provides a batch file to integrate with the ReSharper test runner, custom naming rules, and code annotations. MSpec currently supports ReSharper 6.1, 7.0, and 7.1.
MSpec provides a batch file to integrate with the ReSharper test runner, custom naming rules, and code annotations. MSpec currently supports ReSharper 6.1, 7.0, 7.1, 8.0 and 8.1.

### Code Annotations

Expand Down
2 changes: 1 addition & 1 deletion Source/Examples/Example.Failing/FailingContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class context_with_multiple_establish_clauses
It should = () => { };
}

[DelegateUsage(DelegateUsage.Setup)]
[SetupDelegate]
public delegate void Given();

[Tags("example")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="AssertionSpecs.cs" />
<Compile Include="CatchSpecs.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ShouldBeLikeSpecs.cs" />
<Compile Include="Utility\Internal\ErrorMessageSpecs.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
</Compile>
<Compile Include="Annotations\ReSharperAttributes.cs" />
<Compile Include="AssertComparer.cs" />
<Compile Include="Catch.cs" />
<Compile Include="ComparerStrategies\ComparableComparer.cs" />
<Compile Include="ComparerStrategies\ComparerFactory.cs" />
<Compile Include="ComparerStrategies\ComparisionResult.cs" />
Expand Down
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();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
<Compile Include="..\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="CatchSpecs.cs" />
<Compile Include="ExceptionResultSpecs.cs" />
<Compile Include="Explorers\AssemblyExplorerSpecs.cs" />
<Compile Include="Factories\ContextFactorySpecs.cs" />
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions Source/Machine.Specifications/Framework.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace Machine.Specifications

[AssertDelegate]
public delegate void It();

[BehaviorDelegate]
public delegate void Behaves_like<TBehavior>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
</Compile>
<Compile Include="Annotations\ReSharperAttributes.cs" />
<Compile Include="BehaviorsAttribute.cs" />
<Compile Include="Catch.cs" />
<Compile Include="DelegateUsageAttribute.cs" />
<Compile Include="Factories\BehaviorFactory.cs" />
<Compile Include="Factories\ITagExtractor.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="4.0" DefaultTargets="Default;Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -125,6 +125,7 @@
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project=".\Machine.Specifications.ConsoleRunner.targets" />
<Import Project="$(SolutionDir)\Tools\Ripple\RippleRestoreTask.targets" />
<Import Project="$(SolutionDir)\Tools\GitFlowVersion\build\GitFlowVersionTask.targets" />
<PropertyGroup>
Expand Down
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="&lt;Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/msbuild/2003' /&gt;"/>

<XmlPoke XmlInputPath="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj"
Query="//ns:AssemblyName"
Value="%(ConsoleRunners.AssemblyName)" Namespaces="&lt;Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/msbuild/2003' /&gt;"/>
<XmlPoke XmlInputPath="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj"
Query="//ns:TargetFrameworkVersion"
Value="%(ConsoleRunners.TargetFrameworkVersion)" Namespaces="&lt;Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/msbuild/2003' /&gt;"/>
<XmlPoke XmlInputPath="$(SolutionDir)\Source\Runners\Machine.Specifications.ConsoleRunner\Machine.Specifications.ConsoleRunners.%(ConsoleRunners.PlatformTarget).%(ConsoleRunners.TargetFrameworkVersion).csproj"
Query="//ns:PlatformTarget"
Value="%(ConsoleRunners.PlatformTarget)" Namespaces="&lt;Namespace Prefix='ns' Uri='http://schemas.microsoft.com/developer/msbuild/2003' /&gt;"/>
<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>
Loading

2 comments on commit e5364ed

@algra
Copy link

@algra algra commented on e5364ed Jan 10, 2014

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?

@danielmarbach
Copy link
Contributor Author

@danielmarbach danielmarbach commented on e5364ed Jan 10, 2014 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.