- We want to see your coding and pairing practices.
- Imagine this is a ral world example. So use your usual practices
given this:
{
id: 1,
set-option -g default-command "reattach-to-user-namespace -l bash" | |
setw -g mode-keys vi | |
bind-key -t vi-copy 'v' begin-selection | |
bind-key -t vi-copy y copy-pipe "reattach-to-user-namespace pbcopy" | |
unbind p | |
bind p run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" | |
unbind -t vi-copy Enter | |
bind-key -t vi-copy Enter copy-pipe "reattach-to-user-namespace pbcopy" | |
bind ] run "reattach-to-user-namespace pbpaste | tmux load-buffer - && tmux paste-buffer" |
# Whi I did this | |
# Recently I had a scenario where I needed to run a test int two different contexts, mutually exclusive and with different step implementations. | |
# These exclusion of tests was achieved through using Tags. And this feature needed to exclusive tags. | |
# I didn't want to duplicate the feature file. So I created one feature file with one of the Tags that invoked the scenarios in the other. | |
include Turnip::RSpec::Execute | |
steps_for :tests_1 do | |
step "feature file :feature_file" do |feature_file| |
#!/bin/sh | |
###########Environment settings############# | |
# Modify these to match your setup. | |
export HADOOP_HOME="/Users/mike/hadoop/hadoop-1.1.2" | |
INPUT_URI="mongodb://localhost:27017/mongo_hadoop.yield_historical.in" | |
OUTPUT_URI="mongodb://localhost:27017/demo.yield_historical.out" | |
JARNAME="treasury-example_1.1.2-1.1.0.jar" | |
HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
$number_of_executed_sqls = 0 | |
$file = File.open('/tmp/sql.sql', 'w') | |
module ActiveRecord | |
module ConnectionAdapters | |
class MysqlAdapter | |
def execute(sql, name = nil) | |
$number_of_executed_sqls += 1 if sql != 'BEGIN' and sql != 'COMMIT' | |
$file.puts sql + ";" | |
$file.flush | |
if name == :skip_logging |
package com.paddypower.financials.market.management.rest.logging; | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; |
<profile> | |
<id>cucumber</id> | |
<dependencies> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.5</version> | |
</dependency> | |
<dependency> | |
<groupId>org.testng</groupId> |