Skip to content

Instantly share code, notes, and snippets.

@MothOnMars
MothOnMars / config.yml
Last active June 7, 2019 19:12
Run specs against multiple Ruby versions in CircleCi
#.circleci/config.yml
version: 2.1
executors:
test_executor:
docker:
- image: circleci/ruby:${RUBY_VERSION}
working_directory: ~/app
@MothOnMars
MothOnMars / gist:b999b3c2456e48099b5ec87d32886748
Created January 23, 2018 19:46 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
context "GET index" do
#context "POST create" do
#context "GET show" do
#context "PATCH update" do (or PUT update)
#context "DELETE destroy" do
#context "GET new" do
@MothOnMars
MothOnMars / git_spec.rb
Created February 20, 2014 20:47
spec for git commit message format
describe 'git process' do
describe 'commit message' do
it 'includes the Pivotal Tracker story id' do
includes_properly_formatted_pt_id?.should be_true
end
def includes_properly_formatted_pt_id?
# [Fixes #1234555] for individual stories
# [Fixes #1234555 #928756] if the fix affects multiple stories
last_commit_message = %x{git log -1 --pretty=%B --no-merges}