This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'mechanize' | |
require 'keychain' | |
class Scraper | |
def initialize(url) | |
@url = url | |
@flows = [] | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |