Skip to content

Instantly share code, notes, and snippets.

View nikone's full-sized avatar

Nenad Nikolić nikone

  • Zagreb, Croatia
View GitHub Profile
@nikone
nikone / api_blueprint.rb
Created March 23, 2016 08:55
Api Blueprint test docs
# lib/api_blueprint.rb
require 'rspec/core/formatters/base_formatter'
require 'pry'
class ApiBlueprintPrinter
def initialize(output)
@output = output
end
def print_meta_info
@nikone
nikone / rspec_model_testing_template.rb
Last active August 29, 2015 14:26 — forked from PWSdelta/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
#
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
#
# @kyletcarlson
#
# This skeleton also assumes you're using the following gems: