Rails 4.1, Guard 2.10, and Minitest 5.4.1 -- RuntimeError & Rails::Generators::TestCase -


i'm trying set guard minitest in new rails 4 project. updated gemfile following:

group :development   gem 'guard'   gem 'guard-minitest' end 

and ran bundle exec guard init minitest.

i've got pretty simple test so:

require 'test_helper'  describe classtobetested   describe "#initialize"     "should return classtobetested object"       obj = classtobetested.new       obj.must_be_kind_of classtobetested     end   end end 

the class being tested in app/services/class_to_be_tested.rb.

when run bundle exec guard -n f following:

11:35:43 - info - guard::minitest 2.3.2 running, minitest::unit 5.4.1! 11:35:43 - info - running: tests run options: --seed 36837  # running:  e  finished in 0.005190s, 192.6728 runs/s, 0.0000 assertions/s.    1) error: classtobetested::#initialize#test_0001_should return classtobetested object: runtimeerror: need configure rails::generators::testcase destination root.   1 runs, 0 assertions, 0 failures, 1 errors, 0 skips 11:35:45 - info - guard watching @ '/home/sean/code/ruby/work/project' 

is there i'm missing? in guard/minitest/rails needs configured work properly?

figured out -- apparently thought class generator. adding following line test_helper.rb inside class testcase block fixed issue:

register_spec_type(/classtobetested/, minitest::spec) 

is there way have classes in test/services/ subclassed under minitest::spec, , not generator test class?


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -