Skip to content

Instantly share code, notes, and snippets.

View gist:0cdae3e8e477d8e6e0b5
-- model
some sort of constant hash:
HASH_NAME = {
0 => "Choose:",
1 => "On-Campus Recruiting - CSO",·
2 => "CSO Staff Referral",
3 => "Faculty Contact",·
4 => "Career Day",·
5 => "CSO Summer Job Listing",·
6 => "Alumni Contact",·
@HuckyDucky
HuckyDucky / gist:10219649
Last active Oct 9, 2017
Testing setup for Capybara and autocomplete
View gist:10219649
#############################################################################################################
## This is a gist that contains my complete setup, minus gems, that I needed to get my jQuery autocomplete ##
## testing out properly with the RSpec/Capybara/PhantomJS stack. ##
#############################################################################################################
#########################
## spec/spec_helper.rb ##
#########################
ENV["RAILS_ENV"] = 'test'
View miniskirt.rb
# Factory girl, relaxed.
#
# Factory.define :user do |f|
# f.login 'johndoe%d' # Sequence.
# f.email '%{login}@example.com' # Interpolate.
# f.password f.password_confirmation('foobar') # Chain.
# end
#
# Factory.define :post do |f|
# f.user { Factory :user } # Blocks, if you must.
You can’t perform that action at this time.