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
# in spec_helper.rb | |
# Verify that the cache_busters bust the cache of the given method. | |
# | |
# * method is the name of the method we are testing (for RSpec output) | |
# * cache_busters is a hash of labels => procs which should result in | |
# in the cache being flushed | |
# | |
# Please set these variables in specs which will be using this function: | |
# @cached_function : a proc which executes the code to populate the cache |
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 'spec_helper' | |
describe MicroPost do | |
before do | |
@micro_post = MicroPost.new(user_id: 1, | |
content: "hello world") | |
end | |
describe "with valid attributes" 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
def replace_in_file(path, str, replacement) | |
puts "replacing #{str} with #{replacement} in #{path}" | |
contents = File.read(path) | |
File.write(path, contents.gsub(str, replacement)) | |
end | |
def do_cmd(cmd) | |
puts cmd | |
`#{cmd}` |
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
0:ec2-23-20-57-177.compute-1.amazonaws.com:4000 | |
1:ec2-54-242-170-99.compute-1.amazonaws.com:4001 | |
2:ec2-50-16-152-175.compute-1.amazonaws.com:4002 | |
3:ec2-23-22-127-206.compute-1.amazonaws.com:4003 | |
4:ec2-54-234-28-68.compute-1.amazonaws.com:4004 | |
5:ec2-54-234-225-86.compute-1.amazonaws.com:4005 | |
6:ec2-184-72-181-60.compute-1.amazonaws.com:4006 | |
7:ec2-54-234-216-76.compute-1.amazonaws.com:4007 |
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
select | |
payment_instrument_detail_type, | |
M.company_name, | |
M.public_id, | |
merchant_fk, | |
count(*) | |
from gateway_production.transactions T | |
inner join gateway_production.merchants M ON | |
T.merchant_fk = M.pk | |
where |
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
[{ | |
"question": "A flashing red traffic light signifies that a driver should do what?", | |
"A": "stop", | |
"B": "speed up", | |
"C": "proceed with caution", | |
"D": "honk the horn", | |
"answer": "A" | |
}, { | |
"question": "A knish is traditionally stuffed with what filling?", | |
"A": "potato", |