Rails 5 – Minitest Spec – Fixtures

Rails edge / Rails 5 if you want Minitest + Specs + Fixturesrequire ‘minitest/spec’

class ActiveSupport::TestCase
  # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
  fixtures :all
  # Add more helper methods to be used by all tests here...
  extend MiniTest::Spec::DSL
  register_spec_type(self) do |desc|
    desc < ActiveRecord::Base if desc.is_a?(Class)

Leave a Reply

Your email address will not be published.