This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'fileutils' | |
extend FileUtils | |
cmd1 = "tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down" | |
cmd2 = "tell application \"Terminal\" to do script \"cd #{pwd}\" in the front window" | |
`osascript -e '#{cmd1}' -e '#{cmd2}'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake' | |
APP_NAME = 'heroku_app_name' | |
BACKUP_PATH = '.' | |
namespace "heroku" do | |
desc "create a new Heroku bundle and download it, name with timestamp - only use with single bundle addon" | |
task "backup" do | |
require 'fileutils' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given /^#{capture_model} has a question: "([^\"]*)"$/ do |model_name, question| | |
model = model! model_name | |
store_model "question", '', model.questions.make(:question => question) | |
end | |
Given /^#{capture_model} has a question$/ do |model_name| | |
model = model! model_name | |
factory, name_or_index = *parse_model(%Q(question)) #pickle internals | |
store_model factory, name_or_index, model.questions.make | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ignore-hidden-elements | |
Feature: Div help content hiding and revealing | |
In order to keep help text available but neatly tucked away when not needed | |
As a designer | |
I want javascript to detect div.help and hide it and its contents, replacing with a link to reveal it again | |
Background: | |
#this is a rails app with a Page model and a path_to entry for visiting them in features like this (using Pickle for cucumber / machinist integration) | |
Given a page exists with content: "<div class='help'>foobar</div>" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#defines Step, which is the generic When/Then/Given, since they actually have no meaning to cucumber, they're just fluff for human eyes | |
#written by Ian White, observed by yours truly | |
module AliasStep | |
def Step(arg) | |
When arg | |
end | |
end | |
World(AliasStep) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given I am on the page links page | |
When I follow "New Link" | |
Then I should be on the new page link page | |
When I fill in "Text" with "Fresh Fruit" | |
And I fill in "Path" with "fruit" | |
And I press "Create" | |
Then 1 page link should exist | |
When I go to the homepage |
NewerOlder