Skip to content

Instantly share code, notes, and snippets.

@chischaschos
Created August 3, 2012 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chischaschos/3249833 to your computer and use it in GitHub Desktop.
Save chischaschos/3249833 to your computer and use it in GitHub Desktop.
if defined? Rails
require 'spec_helper'
else
root = File.absolute_path File.join(__FILE__, '..', '..')
$:.unshift File.join root, 'app'
$:.unshift File.join root, 'app', 'helpers'
$:.unshift File.join root, 'app', 'controllers'
$:.unshift File.join root, 'lib'
$:.unshift File.join root, 'config'
require 'rr'
require 'support/mock_helpers'
RSpec.configure do |config|
config.mock_with :rr
end
# Model backbones
class CreditCard; end
class Country; end
class Department; end
class Event; end
class Order; end
class Product; end
class Supplier; end
class Settings; end
class WaitListItem; end
class FxRate; end
class Customer; end
class Flag; end
# Mailers
class SuppliersMailer; end
class ContactMailer ; end
# Controller backbones
module ActionController
class Base
class << self
def actions(*args); end
def before_filter(*args); end
def inherit_resources; end
def protect_from_forgery; end
def layout(*params); end
end
end
end
#helpers
module LayoutHelper; end
module Fvaults
class Response; end
end
class ApplicationController < ActionController::Base; end
module Admin
class BaseController < ApplicationController; end
module Orders; end
end
module Store
module Checkout
module PaypalExpresses
end
module CreditCard
end
end
module Events; end
end
class StoreController < ApplicationController; end
module Devise
class SessionsController; end
class OmniauthCallbacksController; end
end
module Customers
end
# Model helpers
module ApplicationHelper; end
module Customers::LandingpagesHelper; end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment