Skip to content

Instantly share code, notes, and snippets.

View hashrocketeer's full-sized avatar

Hashrocket Employees hashrocketeer

View GitHub Profile
@hashrocketeer
hashrocketeer / candidate_spec.rb
Created October 11, 2011 13:30 — forked from knwang/candidate_spec.rb
Proofing_oven: Candidate Spec with search
require 'spec_helper'
describe Candidate do
subject { Fabricate(:candidate, first_name: "Joe", last_name: "Doe") }
describe "#full_name" do
its(:full_name) { should == "Joe Doe" }
end
describe "#search" do
--regex-ruby=/(^|[:;])[ \t]*([A-Z][[:alnum:]_]+) *=/\2/c,class,constant/
--regex-ruby=/(^|;)[ \t]*(has_many|belongs_to|has_one|has_and_belongs_to_many)\(? *:([[:alnum:]_]+)/\3/f,function,association/
--regex-ruby=/(^|;)[ \t]*(named_)?scope\(? *:([[:alnum:]_]+)/\3/f,function,named_scope/
--regex-ruby=/(^|;)[ \t]*event\(? *:([[:alnum:]_]+)/\2/f,function,aasm_event/
--regex-ruby=/(^|;)[ \t]*event\(? *:([[:alnum:]_]+)/\2!/f,function,aasm_event/
--regex-ruby=/(^|;)[ \t]*event\(? *:([[:alnum:]_]+)/\2?/f,function,aasm_event/