Skip to content

Instantly share code, notes, and snippets.

View jwalton512's full-sized avatar

Jason Walton jwalton512

View GitHub Profile
@jwalton512
jwalton512 / gist:1c12e8a50d17245cdcdd
Created August 24, 2014 17:15
phpspec callback matcher
function it_handles_register_command(MemberRepository $members)
{
$command = new MemberRegisterCommand('email', 'password', 'password');
$members->save(Argument::that(function($member) {
return ($member->email == 'email' && $member->password == 'password');
}))->shouldBeCalled();
$this->handle($command)->shouldBeAnInstanceOf(MemberRegisterCommandResponse::class);
}
@jwalton512
jwalton512 / .env.json
Last active August 29, 2015 14:05
Setting Laravel environment for acceptance testing (in Behat)
{"env":"local"}
@jwalton512
jwalton512 / example_scenario
Created November 12, 2014 16:32
An example web scenario
Scenario: Searching for a page that does exist
Given I am on "/wiki/Main_Page"
When I fill in "search" with "Behavior Driven Development"
And I press "searchButton"
Then I should see "agile software development"
@jwalton512
jwalton512 / domain_modelling_example
Created November 12, 2014 20:43
Example of domain modeling by example
Scenario: Register for an event
Given there is an event open for registration
When I register for the event
Then I should have an event on my schedule
@jwalton512
jwalton512 / BusServiceProvider.php
Created January 27, 2015 16:57
snake_case and camelCase in L5 Dispatcher
<?php namespace App\Providers;
use App\Bus\Dispatcher;
use Illuminate\Support\ServiceProvider;
class BusServiceProvider extends ServiceProvider {
/**
* Bootstrap any application services.
*
@jwalton512
jwalton512 / admin.js
Created June 11, 2015 15:13
learning vue.js
var track = require('./track');
@jwalton512
jwalton512 / adddomain
Last active September 12, 2015 14:36 — forked from simonj/adddomain
app.js
module.exports = {
}
@jwalton512
jwalton512 / addDomain.js
Last active September 15, 2015 16:32 — forked from simonj/addDomain.js
/*
* test
*/
module.exports = {
template: '<p>A custom component!</p>'
}
@jwalton512
jwalton512 / example.sublime-project
Created October 8, 2015 21:11
sublime project php-cd-fixer build system
{
"folders":
[
{
"path": "."
}
],
"build_systems":
[
{
var gulp = require('gulp'),
browserSync = require('browser-sync'),
sass = require('gulp-sass'),
prefix = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
cp = require('child_process'),