Skip to content

Instantly share code, notes, and snippets.

View adonaldson's full-sized avatar

Andrew Donaldson adonaldson

View GitHub Profile
@adonaldson
adonaldson / hsbc.rb
Created September 17, 2012 13:14 — forked from lukeredpath/hsbc.rb
Automated HSBC business banking statement downloads (TODO: Update to work with Personal accounts)
require 'rubygems'
require 'mechanize'
require 'keychain'
class Scraper
def initialize(url)
@url = url
@flows = []
end
class AdvertsController < ActionController::Base
protect_from_forgery
# Non-adminny controller, delete the adverts.html.erb from app/view/layouts, it'll default to using
# application.html.erb
end
class AdminController < ActionController::Base
protect_from_forgery
before_filter :login_required
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Event do
it "should be refillable if the event is floating and not complete" do
event = Event.new(:complete => false)
event.stub!(:floating?).and_return true
event.should be_refillable
end
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Event do
it "should be refillable if the event is floating and not complete" do
event = Event.new(:complete => false)
event.stub!(:floating?).and_return true
event.should be_refillable
end