Skip to content

Instantly share code, notes, and snippets.

@owenkellogg
Created June 25, 2012 17:49
Show Gist options
  • Save owenkellogg/2990142 to your computer and use it in GitHub Desktop.
Save owenkellogg/2990142 to your computer and use it in GitHub Desktop.
MiniTest Helper for Rails
config.generators do |g|
g.test_framework :mini_test, :spec => true, :fixture => true
g.integration_tool :mini_test
end
group :test, :development do
gem 'minitest-rails',
:git => "[email protected]/rawongithub/minitest-rails.git",
:branch => "gemspec"
end
group :test do
gem 'minitest-rails-shoulda',
:git => "[email protected]/rawongithub/minitest-rails-shoulda.git"
gem 'capybara_minitest_spec'
end
require "minitest/autorun"
require "minitest/rails"
require "minitest/pride" # let's have awesome colorful output;)
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
class MiniTest::Rails::Spec
# Add methods to be used by all specs here
end
class MiniTest::Rails::Model
# make fixtures available within models spec
include MiniTest::Rails::Fixtures
end
class MiniTest::Rails::Controller
# Add methods to be used by controller specs here
end
class MiniTest::Rails::Helper
# Add methods to be used by helper specs here
end
class MiniTest::Rails::Mailer
# Add methods to be used by mailer specs here
end
class MiniTest::Rails::Integration
# Add methods to be used by integration specs here
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment