Skip to content

Instantly share code, notes, and snippets.

Avatar

Frank C. Schuetz opahk

  • San Francisco Bay Area
View GitHub Profile
View gist:a2f6f469b11230059315
base
* simplecov
* rspec
* capybara
quality
* checker
* rails_best_practices
* jslint
* coffeelint
View check threshold and complexity after running tests
bundle exec cane --no-doc --gte "path/to/coverage/covered_percent,99" --lte "path/to/coverage/missed_lines,28"
@opahk
opahk / factory_girl_debugging.rb
Created Mar 15, 2012 — forked from dolzenko/factory_girl_debugging.rb
Commands to debug Factory Girl from console
View factory_girl_debugging.rb
require 'factory_girl_rails'
require 'rspec'
require 'rspec-rails'
include FactoryGirl::Syntax::Methods # make FG methods available at top level, so you can do `> create :user`
def reload_factories!
FactoryGirl.instance_variable_set(:@factories, nil) # => clear loaded factories/sequences
# FactoryGirl.instance_variable_set(:@sequences, nil)
Dir[Rails.root.join('spec/factories/*.rb')].each { |f| load f } # => loads factories again