jstorimer / spin

Spin speeds up your Rails testing workflow by preloading your Rails environment.

Home Page:http://jstorimer.github.com/spin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conflicts with minitest

kirs opened this issue · comments

My test/minitest_helper.rb:

ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)

require "minitest/autorun"
require "minitest/rails"

# Add `gem "minitest-rails-capybara"` to the test group of your Gemfile
# and uncomment the following if you want Capybara feature tests
# require "minitest/rails/capybara"

# Uncomment if you want awesome colorful output
require "minitest/pride"

class ActiveSupport::TestCase
  # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
  # fixtures :all

  # Add more helper methods to be used by all tests here...
end

The test (test/models/user_test.rb)

# encoding: utf-8
require 'minitest_helper'

describe User do
...

Spin output:

Loading ["test/models/user_test.rb"]
/Users/kir/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- minitest_helper (LoadError)

I use Rails 3.2.11 and spin 0.6

Try adding -Itest to your spin command to add the test directory to the load path.

be spin serve -Itest 
be spin push test/
Loading ["test"]
/Users/kir/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/activesupport-3.2.12/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- /Users/kir/Projects/projectname/test/ (LoadError)

But actually, test directory exists and there are a lot of tests :)
When I run rake minispec everything is ok.