Created
September 19, 2013 00:49
-
-
Save aamax/6617813 to your computer and use it in GitHub Desktop.
minitest not running My tests were working ok yesterday - been working on expanding them. all of a sudden, when i run them I get the following results. any idea what I've done? not sure what other info would be needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rake minitest:all | |
NOTICE: CREATE TABLE will create implicit sequence "roles_id_seq" for serial column "roles.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "roles_pkey" for table "roles" | |
NOTICE: CREATE TABLE will create implicit sequence "shift_types_id_seq" for serial column "shift_types.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "shift_types_pkey" for table "shift_types" | |
NOTICE: CREATE TABLE will create implicit sequence "shifts_id_seq" for serial column "shifts.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "shifts_pkey" for table "shifts" | |
NOTICE: CREATE TABLE will create implicit sequence "sys_configs_id_seq" for serial column "sys_configs.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "sys_configs_pkey" for table "sys_configs" | |
NOTICE: CREATE TABLE will create implicit sequence "users_id_seq" for serial column "users.id" | |
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "users_pkey" for table "users" | |
Run options: --seed 14653 | |
Started | |
0/0: 0 00:00:00 | |
Finished in 0.06009s | |
Run options: --seed 57134 | |
Started | |
Finished in 35.21775s | |
Run options: --seed 28755 | |
Started | |
0/0: 0 00:00:00 | |
Finished in 0.02476s | |
Run options: --seed 58015 | |
Started | |
0/0: 0 00:00:00 | |
Finished in 0.02553s | |
Loaded Suite test,test/controllers,test/factories,test/helpers,test/mailers,test/models | |
Started at 2013-09-18 17:41:04 -0600 w/ seed 27948. | |
Finished in 0.000160 seconds. | |
0 tests, 0 passed, 0 failures, 0 errors, 0 skips, 0 assertions | |
ruby -v: ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin11.4.2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'spork' | |
#uncomment the following line to use spork with the debugger | |
#require 'spork/ext/ruby-debug' | |
Spork.prefork do | |
# Loading more in this block will cause your tests to run faster. However, | |
# if you change any configuration or code from libraries loaded here, you'll | |
# need to restart spork for it take effect. | |
end | |
Spork.each_run do | |
# This code will be run each time you run your specs. | |
end | |
# --- Instructions --- | |
# Sort the contents of this file into a Spork.prefork and a Spork.each_run | |
# block. | |
# | |
# The Spork.prefork block is run only once when the spork server is started. | |
# You typically want to place most of your (slow) initializer code in here, in | |
# particular, require'ing any 3rd-party gems that you don't normally modify | |
# during development. | |
# | |
# The Spork.each_run block is run each time you run your specs. In case you | |
# need to load files that tend to change during development, require them here. | |
# With Rails, your application modules are loaded automatically, so sometimes | |
# this block can remain empty. | |
# | |
# Note: You can modify files loaded *from* the Spork.each_run block without | |
# restarting the spork server. However, this file itself will not be reloaded, | |
# so if you change any of the code inside the each_run block, you still need to | |
# restart the server. In general, if you have non-trivial code in this file, | |
# it's advisable to move it into a separate file so you can easily edit it | |
# without restarting spork. (For example, with RSpec, you could move | |
# non-trivial code into a file spec/support/my_helper.rb, making sure that the | |
# spec/support/* files are require'd from inside the each_run block.) | |
# | |
# Any code that is left outside the two blocks will be run during preforking | |
# *and* during each_run -- that's probably not what you want. | |
# | |
# These instructions should self-destruct in 10 seconds. If they don't, feel | |
# free to delete them. | |
ENV["RAILS_ENV"] = "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
require "minitest/autorun" | |
require "rails/test_help" | |
require "minitest/rails" | |
require "active_support/testing/setup_and_teardown" | |
require 'minitest/reporters' | |
require 'minitest/mock' | |
MiniTest::Reporters.use! | |
# 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" | |
require 'database_cleaner' | |
DatabaseCleaner.strategy = :truncation | |
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 | |
class HelperTest < MiniTest::Spec | |
include ActiveSupport::Testing::SetupAndTeardown | |
include ActionView::TestCase::Behavior | |
register_spec_type(/Helper$/, self) | |
end | |
#class ActionDispatch::IntegrationTest | |
# include Rails.application.routes.url_helpers | |
# include Capybara::RSpecMatchers | |
# include Capybara::DSL | |
#end | |
class ActiveRecord::Base | |
mattr_accessor :shared_connection | |
@@shared_connection = nil | |
def self.connection | |
@@shared_connection || retrieve_connection | |
end | |
end | |
# Forces all threads to share the same connection. This works on | |
# Capybara because it starts the web server in a thread. | |
ActiveRecord::Base.shared_connection = ActiveRecord::Base.connection | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Are you 1) using the Minitest spec DSL and 2) did you add something to your Gemfile recently that has a dependency on RSpec? RSpec will stomp on Minitest's spec DSL.