This file contains hidden or 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 'active_support' | |
module TestConcern | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def test_class_method | |
puts "I gots class!" | |
end | |
end |
This file contains hidden or 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_relative './upload_store' | |
class PhotoClaimer | |
attr_writer :photo_source | |
attr_writer :upload_storage_source | |
class FileNotFound < RuntimeError; end | |
def initialize(user_id, file_name) | |
@user_id = user_id |
This file contains hidden or 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
module Categories | |
ALL = [ | |
:BUSINESS, | |
:CALL, | |
:CONTACT, | |
:KNOWLEDGE, | |
:ENTERTAINMENT, | |
:EMAIL, | |
:HELP, | |
:TRAVEL, |
This file contains hidden or 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
describe Article do | |
subject(:article) { Article.new } | |
it "validates presence of :title" do | |
article.should validate_presence_of(:title) | |
end | |
end |