Skip to content

Instantly share code, notes, and snippets.

Peter Grainger peterjgrainger

Block or report user

Report or block peterjgrainger

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
peterjgrainger / shorten_array.rb
Created Jan 28, 2019
Ruby code showing Test Driven Learning
View shorten_array.rb
# lib/shorten_array.rb
module ShortenArray
def self.first_two_items(array)
[array[0], array[1]]
peterjgrainger / shorten_array_spec.rb
Created Jan 28, 2019
RSpec test showing Test Driven Learning
View shorten_array_spec.rb
# spec/shorten_array_spec.rb
require 'shorten_array.rb'
describe ShortenArray do
it 'returns the first 2 items from the array' do
best_array_ever = %w[best array ever]
result = ShortenArray.first_two_items(best_array_ever)
expect(result).to eq %w[best array]
View app
'use strict';
const config = {
rabbitLocation: '',
reconnectTimeout: 4000
let subscriptionHandlerModule = require('./messaging/subscription-handler');
let subscriptionHandlerInstance;
View docker-compose
image: rabbitmq:3-management
- "5672:5672"
- "15672:15672
You can’t perform that action at this time.