Skip to content

Instantly share code, notes, and snippets.

View johnnonolan's full-sized avatar

John Nolan johnnonolan

View GitHub Profile
@aslakhellesoy
aslakhellesoy / chess.feature
Created January 26, 2011 00:38
Let's cuke some chess...
Feature: Validate moves
Scenario: Moving the knight illegally
Given the following board:
| | | | | | | | |8|
| | | | | | | | |7|
| | | | | | | | |6|
| | | | | | | | |5|
| | | |♞| | | | |4|
| | | | | | | | |3|
|♙| | | | | | | |2|
namespace iDoc.specs.When
{
[Subject("AcccountManagement")]
public class CreatingAUserAccount : with_controller<AccountController,AccountResource>
{
static string sentto;
Establish context = () =>
{
Mock<IEmailProvider>.Send(It.IsAny<etc>)
.CallBack((EmailModel model) => emailaddress = model.emailaddress)
@cowboy
cowboy / very-small-ie-detect.js
Created August 21, 2010 13:26 — forked from padolsey/gist:527683
Very small IE detect (aka type coersion ftw)
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 6) then:
// ie === 0
// If you're in IE (>=6) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}