Skip to content

Instantly share code, notes, and snippets.

@chriskottom
Last active December 24, 2015 05:29
Show Gist options
  • Save chriskottom/6750464 to your computer and use it in GitHub Desktop.
Save chriskottom/6750464 to your computer and use it in GitHub Desktop.
Rails 4 application setup (MiniTest, HAML, ...)
# Emacs temporary files
*~
\#*\#
# Bundler artifacts
.bundle
vendor/bundle
# Database configuration, files
config/database.yml
config/redis.yml
# Asset generation artifacts
*.sassc
.sass-cache/
# Ruby / Rails operational files
.rbenv-version
.rspec
.rvmrc
.powrc
*.rbc
capybara-*.html
coverage/
config/initializers/secret_token.rb
db/*.sqlite3
log/*
public/system/*
spec/tmp/*
tmp/**/*
tmp/restart.txt
# Anything temporary
**.old
**.orig
**.original
**.swp
**.swo
require File.expand_path('../boot', __FILE__)
#require 'rails/all'
require 'active_record/railtie'
require 'action_controller/railtie'
require 'rake/testtask'
require 'action_mailer/railtie'
require 'sprockets/railtie'
require 'minitest/rails/railtie'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
module ApplicationName
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Customize generators for tests, factories.
config.generators do |g|
g.test_framework :mini_test, spec: true
g.factory_girl dir: 'test/factories'
end
end
end
source 'https://rubygems.org'
gem 'rails', '4.0.0'
gem 'mysql2'
gem 'sass-rails', '~> 4.0.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'haml-rails'
group :development, :test do
gem 'therubyracer', platforms: :ruby
end
group :development do
gem 'capistrano'
gem 'capistrano_colors'
gem 'capistrano-ext'
gem 'unicorn'
end
group :test do
gem 'minitest-spec-rails'
gem 'minitest-rails-capybara'
gem 'turn'
gem 'faker'
gem 'forgery'
gem 'factory_girl_rails'
end
group :doc do
gem 'sdoc', require: false
end
ENV["RAILS_ENV"] = "test"
require File.expand_path("../../config/environment", __FILE__)
require "rails/test_help"
require "minitest/rails"
require "minitest/rails/capybara"
require 'turn/autorun'
Turn.config do |c|
c.format = :outline
c.trace = 8
c.natural = true
end
class ActiveSupport::TestCase
include FactoryGirl::Syntax::Methods
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
fixtures :all
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment