Skip to content

Instantly share code, notes, and snippets.

I'm Innocent

Innocent Udeogu Innarticles

I'm Innocent
Block or report user

Report or block Innarticles

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Innarticles / rspec_model_testing_template.rb
Created Sep 11, 2016 — forked from kyletcarlson/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…
View rspec_model_testing_template.rb
# 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:
View rspec_cheatsheet_controller_spec.rb
require 'rails_helper'
RSpec.describe TodosController, :type => :controller do
context "GET index" do
#context "POST create" do
#context "GET show" do
#context "PATCH update" do (or PUT update)
#context "DELETE destroy" do
#context "GET new" do
View gist:af92fa121710fc4e94c6
import sys
import getopt
import csv
import argparse
def main(argv):
args = getopt.getopt(argv, "")
args = str(args[1][0])
print args
def get_cnt(lVals):
Innarticles / nasa_code_results.csv
Last active Nov 24, 2015
Output of frequency of URL in NASA weblogs
View nasa_code_results.csv
/images/NASA-logosmall.gif 2140
/images/MOSAIC-logosmall.gif 1756
/images/USA-logosmall.gif 1748
/images/WORLD-logosmall.gif 1734
/images/ksclogo-medium.gif 1727
/ksc.html 1382
/images/KSC-logosmall.gif 1294
/ 627
/history/apollo/images/apollo-logo1.gif 606
/images/launch-logo.gif 562
You can’t perform that action at this time.