Skip to content

Instantly share code, notes, and snippets.

View antony's full-sized avatar
:octocat:
Loving SvelteJS

Antony Jones antony

:octocat:
Loving SvelteJS
View GitHub Profile
@antony
antony / gist:5907972
Created July 2, 2013 09:36
Angular Select Box DSL Extension for retreiving Options.
angular.scenario.dsl('selectBox', function() {
var chain = {};
chain.option = function(value) {
return this.addFutureAction("select '" + this.name + "' option '" + value + "'", function($window, $document, done) {
var select = $document.elements('select[name="$1"]', this.name);
var option = select.find('option[value="' + value + '"]');
if (option.length) {
select.val(value);
} else {
@antony
antony / gist:2002027
Created March 8, 2012 16:50
Spock Formatting
def "The 'recommended' way"() {
when:
enabled = true
firstName = "Luke"
lastName = "Daley"
createButton.click()
then:
at ShowPage
}
@antony
antony / grails-geb
Created February 14, 2012 11:54
A properly configured BuildConfig.groovy for running Geb under Grails 2.0
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.dependency.resolution = {
inherits("global") {
}
log "warn"
@antony
antony / Xephyr.groovy
Created November 30, 2011 10:43
Running functional tests with Xephyr
includeTargets << grailsScript("_GrailsInit")
display = ':65'
resolution = '-screen 1024x768'
target('default': "Run tests with xephyr") {
List parsedArgs = args.split() as List
exec (executable: 'Xephyr', spawn: true) {