ruby on rails - Cannot find my test_helper file (LoadError) -


My test fails while trying to find the test_helper file.

My file:

  requires File.dirname (__ FILE__) + '/../test_helper' requires 'admin / supplier_controller' # Controller class Increase errors by Admin :: Supplier Controller; Def defending_action (e) boost end; And Class admin :: Suppliers Controller Test & lt; ActionController :: testcase fixtures: suppliers def set @controller = admin :: SupplierController.new @request = ActionController :: TestRequest.new @response = ActionController :: TestResponse.new end-def test_new get: new assert_template 'admin / supplier / new 'Assert_tag' h1 ',: Content = & gt; 'Create New Supplier' assert_tag 'form' ,: attributes = & gt; {: Action = & gt; '/ Admin / Supplier / Create'} End End  

No need to do this Is:

  Required File.dirname (__ FILE__) + '/../test_helper'  

Requires 'test_helper' on bus above the test file, and add the -Itest option to run the test (assuming that test_helper.rb is located in the test / directory)

< / Html>

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -