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 |
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
@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
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
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
#!/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
class Tests | |
SUBTESTS = %w(Abstract Decision Quantitative Verbal) | |
end | |
describe Tests do | |
describe "before assigning @ - " do | |
describe "this doesn't work because the loops are all at the same describe level (the befores override one another)" do | |
Tests::SUBTESTS.each do |test| | |
before(:each) do |
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
describe "3 users exist" | |
let(:users) {(1..3).map {User.make}} | |
specify "user count should be 3" do | |
pending "this will fail because users hasn't been called" do | |
User.count.should == 3 | |
end | |
end | |
specify "3 users should exist" do |
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
describe "when some redirect mappings are present in the Medify::PAGE_REDIRECTS hash" do | |
before(:each) do | |
Medify::PAGE_REDIRECTS['/abstract-reasoning-subtest-advice-by-medify'] = '/advice-pages/abstract-reasoning-subtest-advice-by-medify' | |
Medify::PAGE_REDIRECTS['/decision-analysis-subtest-advice-by-medify'] = '/advice-pages/decision-analysis-subtest-advice-by-medify' | |
end | |
describe "GET :show, :path => abstract-reasoning-subtest-advice-by-medify" do | |
subject {get :show, :path => 'abstract-reasoning-subtest-advice-by-medify'} | |
it {should be_redirect} | |
it {should redirect_to('/advice-pages/abstract-reasoning-subtest-advice-by-medify')} |
OlderNewer