Skip to content

Instantly share code, notes, and snippets.

@urbantumbleweed
urbantumbleweed / person.rb
Last active Aug 29, 2015
Setting up testing environment
View person.rb
require 'spec_helper'
describe Person do
before do
let(:person) { factory(:person) }
end
describe ".create" do
it "should have an img_url, drinks_attribute, license, first name and last name when created" do
@urbantumbleweed
urbantumbleweed / Ticker.rb
Created Apr 1, 2014
Reading CSV data into database
View Ticker.rb
class Ticker < ActiveRecord::Base
has_many :price_histories, dependent: :destroy
has_many :scans
has_and_belongs_to_many :patterns
has_many :opportunities
has_many :trades, through: :opportunities
def retrieve_standard_quote
#requests the standard quote from Yahoo