Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflicts with minitest #71

Open
kirs opened this issue Feb 24, 2013 · 2 comments
Open

Conflicts with minitest #71

kirs opened this issue Feb 24, 2013 · 2 comments

Comments

@kirs
Copy link
Collaborator

kirs commented Feb 24, 2013

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

@dstrelau
Copy link
Collaborator

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

@kirs
Copy link
Collaborator Author

kirs commented Mar 9, 2013

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants