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
# -------------------------------------------------------------------------- | |
# Basic rails CRUD controller snippet | |
# Find all: | |
# model => replace with the instance variable | |
# Model => replace with the class name | |
# -------------------------------------------------------------------------- | |
def index | |
@models = Model.all | |
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 'spec_helper' | |
# ------------------------------------------------- | |
# Just build a model instance using a factory | |
# and assert that it is valid | |
# | |
# Model => model class | |
# @base_model => model instance | |
# :model => factory name | |
# |
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
present? |
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
# ---------------------------------------------------------------------- | |
# Description | |
# ---------------------------------------------------------------------- | |
# TEST: Pending | |
# ---------------------------------------------------------------------- |
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 ActiveSupport::TestCase | |
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. | |
# | |
# Note: You'll currently still have to declare fixtures explicitly in integration tests | |
# -- they do not yet inherit this setting | |
# fixtures :all | |
# Shortcut for Factory girl | |
include FactoryGirl::Syntax::Methods |