I wish to use rake to run specific tests in a folder contained withing spec folder. My folder structure is as follows:
- tests
-spec
- folder_A
- folder_B
- rakefile
So for example when certain code is deployed I just wish to run the tests in folder_A. How do I do this using rake? My rakefile lives in my tests folder. I currently have the command:
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
This runs all tests in the spec folder as you would expect. I have tried moving the rake file into the spec folder and editing the rake task to this:
RSpec::Core::RakeTask.new(:folder_A)
task :default => :folder_A
However this gives me the message: "No examples matching ./spec{,//*}/*_spec.rb could be found" (note that within folders A and B I have sub directories for the different areas of the application under test)
Is it possible for me to have 2 different rake tasks in the same rakefile that will run the tests just from folder_A?
Any help would be great!!