Instantly share code, notes, and snippets.

@braidn /Gemfile.rb Secret
Created Aug 3, 2014

Embed
What would you like to do?
Minitest Rails Setup
#add to this file under the application class
config.generators do |g|
g.test_framework :minitest, spec: true, fixture: false
g.helper false
g.assets false
g.view_specs false
g.integration_specs false
end
Rails::TestTask.new("test:features" => "test:prepare") do |t|
t.pattern = "test/features/*_test.rb"
end
#add to the Gemfile
group :test do
gem 'minitest-rails'
gem 'minitest-spec-expect'
gem 'minitest-reporters'
end
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'minitest/reporters'
require 'minitest/spec/expect'
require "minitest/rails"
Minitest::Reporters.use!
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml 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
# Add more helper methods to be used by all tests here...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment