Skip to content

Instantly share code, notes, and snippets.

View gabrieljoelc's full-sized avatar

Gabriel Chaney gabrieljoelc

View GitHub Profile
@gabrieljoelc
gabrieljoelc / env.rb
Last active August 29, 2015 14:10 — forked from opsb/gist:3486581
Spinach adapter for Sauce Connect
ENV['RAILS_ENV'] = 'test'
require './config/environment'
require 'minitest/spec'
require 'spinach/capybara'
require_relative 'spinach_helper'
require_relative 'sauce'
Spinach::Scenario.send(:prepend, SpinachHelper::Scenario)
begin
@gabrieljoelc
gabrieljoelc / GitStaticStackAndGotchasDemoTests.cs
Last active December 13, 2015 22:59 — forked from robdmoore/gist:4618493
Tests1-4 are NSubstitute static stack demonstrations by @robdmoore. I added Tests5-6 to demonstrate a class substitution gotcha that happens if the Object#Equals() is overriden in a class used for an method argument match.
using System;
using NSubstitute;
using NSubstitute.Exceptions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Tests
{
[TestClass]
public class Class1
{