Skip to content

Instantly share code, notes, and snippets.

@damoncali
damoncali / person_test.rb
Created September 16, 2011 14:12 — forked from tenderlove/person_test.rb
Use minitest/spec with Rails 3
require 'test_helper'
require 'minitest/autorun'
class MiniTest::Spec
include ActiveSupport::Testing::SetupAndTeardown
include ActiveRecord::TestFixtures
alias :method_name :__name__ if defined? :__name__
self.fixture_path = File.join(Rails.root, 'test', 'fixtures')
end
@damoncali
damoncali / gist:9784257
Last active August 29, 2015 13:57
Fancy Git Prompt for OSX
#credit goes to Xavier Shay for this one: http://xaviershay.com/
#put this in ~/.bash_login, then reload with . ~/.bash_login
#fancy git prompt
function parse_git_dirty {
git diff --quiet 2> /dev/null || echo " *"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1$(parse_git_dirty))/"