Skip to content

Instantly share code, notes, and snippets.

View krukow's full-sized avatar

Karl Krukow krukow

View GitHub Profile
@krukow
krukow / build-log
Created September 30, 2018 12:45
uberjar issue
➜ vsts-flow-metrics git:(feature/tools-deps) ✗ clj -A:uberjar -Srepro -Sverbose
version = 1.9.0.394
install_dir = /usr/local/Cellar/clojure/1.9.0.394
config_dir = /Users/krukow/.clojure
config_paths = /usr/local/Cellar/clojure/1.9.0.394/deps.edn deps.edn
cache_dir = .cpcache
cp_file = .cpcache/1294198245.cp
Cleaning target
Creating target/classes
@krukow
krukow / map.feature
Created October 10, 2012 21:35
Example Feature
Feature: Map
As a festival attendee I should be able to get a map of the
Festival site. It should include points of interest (POIs), and
my current location.
Scenario: My location
Given I am on the Map
When I tap the My Location button
Then the map should move to my location
@krukow
krukow / ios_only.rb
Created September 18, 2012 22:15
ios_only.rb
if ENV['CALABASH_IOS']=="1"
Given /^I am on the Home screen$/ do
query(...)
end
end
@krukow
krukow / table_step_def.rb
Created September 17, 2012 19:29
table_step_def.rb
Given /the following people exist:/ do |people_table|
people_table.hashes.each do |hash|
# The first time the +hash+ will contain:
# {'name' => 'Aslak', 'email' => 'aslak@email.com', 'phone' => '123'}
# The second time:
# {'name' => 'Joe', 'email' => 'joe@email.com', 'phone' => '234'}
# etc.
end
end
@krukow
krukow / table.feature
Created September 17, 2012 19:27
table
Given the following people exist:
| name | email | phone |
| Aslak | aslak@email.com | 123 |
| Joe | joe@email.com | 234 |
| Bryan | bryan@email.org | 456 |
@krukow
krukow / hooks.rb
Created September 17, 2012 19:19
hooks
Before do |scenario|
end
After do |scenario|
puts "Oh no" if scenario.failed?
end
Before('@atag') do |scenario|
@krukow
krukow / gist:3737078
Created September 17, 2012 12:43
tags
cucumber --tags @focus
cucumber --tags @focus,@email
cucumber --tags @focus,@email --tags @fast
cucumber --tags @focus,@email --tags @~slow
@krukow
krukow / gist:3737043
Created September 17, 2012 12:35
formatter
cucumber --format html --out a.html --format 'Slowhandcuke::Formatter'
Feature: Addition
Scenario: Basic Addition # features/addition.feature:3
Given a new counter # features/step_definitions/common.rb:1
When I add 3 # features/step_definitions/addition_steps.rb:2
Then the count should be 3 # features/step_definitions/common.rb:7
Scenario: Basic Addition2 # features/addition.feature:10
Given a new counter # features/step_definitions/common.rb:1
@krukow
krukow / user_trans.rb
Created September 17, 2012 11:46
use transform
Then /^the count must be (#{NUMBER})$/ do |result|
assert_equal @counter.count, result,
"Expected count #{result}, but the counter contained #{@counter.count}"
end
@krukow
krukow / transforms.rb
Created September 17, 2012 11:43
transform
NUMBER = Transform /^\d+$/ do |num_str|
num_str.to_i
end