Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
IPATH="/Applications/iTunes.app/Contents/MacOS"
if [ ! -e "$IPATH/iTunesX" ]
then
sudo mv "$IPATH/iTunes" "$IPATH/iTunesX"
# has sudo failed?
if (( $? ))
Feature: New Study
In order to create a new Study
As a Researcher
I must be able to enter information about the study and save it
Scenario Outline: Researcher adds new study
When I enter <study name>
And I enter <short url>
And I enter <welcome text>
And I set self registration to <self registration>
@everzet
everzet / bad_steps_proposition.php
Created June 7, 2011 19:12 — forked from alexandresalome/gist:1012539
Explaining why classes are not possible in Behat as step definitions
<?php
/*
You can't use classes like this to define steps by the simple reason:
in Behat and Cucumber, step definitions and test contexts ARE two
splitted logical elements, not one. Different step definitions
can be used together in different scenarios and each scenario will
have it's own context (environment) object. That's the main logical
idea behind Behat - define step once - use it everywhere.
@everzet
everzet / gist:5722238
Last active December 18, 2015 03:59 — forked from gquemener/gist:5722064
<?php
//PHPUnit
public function testApply() {
$mock = $this->getMock('My\Foo\Class', array('apply'));
$mock->expects($this->any())
->method('apply')
->with('foo')
->will($this->returnValue('bar'));
<?php
use Behat\Behat\Context\Context;
namespace Context;
class RegistrationContext implements Context
{
/**
* @When I go to the registration page