Skip to content

Instantly share code, notes, and snippets.

@vamsee
Forked from tenderlove/person_test.rb
Created August 21, 2011 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vamsee/1160061 to your computer and use it in GitHub Desktop.
Save vamsee/1160061 to your computer and use it in GitHub Desktop.
Use minitest/spec with Rails 3
require 'test_helper'
require 'minitest/autorun'
module Tenderlove
class Spec < MiniTest::Spec
include ActiveSupport::Testing::SetupAndTeardown
include ActiveRecord::TestFixtures
alias :method_name :__name__ if defined? :__name__
self.fixture_path = File.join(Rails.root, 'test', 'fixtures')
end
end
class PersonTest < Tenderlove::Spec
fixtures :people
describe 'holy shit' do
it 'does awesome stuff' do
1.must_equal 1
end
end
it 'finds a fixture' do
people(:one).name.must_equal 'America!'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment