ruby on rails - rake test doesn't recognize a new folder inside the test folder -
When I run the rake test
, then I did not test it in a new folder has gone.
By default this folder is within the test folder in the Rail folder:
When I run the test, i.e. the rake test
, it tests the contents of the test folder.
I have added an API folder inside the test folder.
The contents of the API folder are tested When I do this: rake test: test = test / api / users_test.rb
But, when I just do the rake test
This API does not test the content of the folder. How to configure it?
rake test: all
should run all the tests subdirectories of the test folder , Even non-default ones.
If you want to work in Rake Test: API
: What to do rake -w test | Grep '^ Rec Test'
to see the file (in Raillets gem) where the railway test defines tasks. You will see how the Railways determines the work for the default subdirectories. Create a lib / tasks / test.rake and do the same thing for your new subdirectory:
Rail :: Test Task NY ('API' = & gt; "TEST: PREPARE"). T | T.pattern = "test / api / ** / * _ test.rb" end
Comments
Post a Comment