Skip to content

Instantly share code, notes, and snippets.

@sethbro
sethbro / spec_helper.rb
Created February 10, 2012 01:09
Rails unit, functional and integration tests in Minitest spec format.
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rubygems'
gem 'minitest'
require 'minitest/autorun'
require 'action_controller/test_case'
require 'miniskirt'
require 'capybara/rails'
@sethbro
sethbro / test_helper.rb
Created January 13, 2012 18:19
MiniTest::Spec with Rails setup
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/autorun'
require 'minitest/pride'
require 'capybara/rails'
class MiniTest::Spec
include ActiveSupport::Testing::SetupAndTeardown
user admin;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
error_log logs/error.log debug;
#pid logs/nginx.pid;
@sethbro
sethbro / _speech_bubble.sass
Created March 10, 2011 22:31
Speech bubble Sass mixin
=speech_bubble($arrow_dir: left, $arrow_pos: 50%, $color: #efefef, $border_width: 2px, $border_color: #ccc)
border-style: solid
border-width: $border_width
border-color: $border_color
+border-radius
background-color: $color
position: relative
overflow: visible
$dir_x: right