Created
January 18, 2012 21:36
-
-
Save seanbehan/1635859 to your computer and use it in GitHub Desktop.
How to add an arbitrary directory to your tests/ directory
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
| # Edit Rakefile in project root | |
| # | |
| # Add a new rake test task... E.g., rake test:lib, below everything else in that file... | |
| # Alternatively, add a task in lib/tasks/ directory and plop in the same code | |
| namespace :test do | |
| desc "Test lib source" | |
| Rake::TestTask.new(:lib) do |t| | |
| t.libs << "test" | |
| t.pattern = 'test/lib/**/*_test.rb' | |
| t.verbose = true | |
| end | |
| end | |
| lib_task = Rake::Task["test:lib"] | |
| test_task = Rake::Task[:test] | |
| test_task.enhance { lib_task.invoke } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment