Unified · Split
| @@ -115,6 +115,8 @@ for usage instructions. · 114 unmodified lines | ||
| 115 | 115 | |
| 116 | 116 | # Tests |
| 117 | 117 | thor test:all # Run all tests |
| 118 | +thor test:docs # Run "Docs" tests | |
| 119 | +thor test:app # Run "App" tests | |
| 118 | 120 | |
| 119 | 121 | # Assets |
| 120 | 122 | thor assets:compile # Compile assets (not required in development mode) |
| @@ -7,9 +7,23 @@ class TestCLI < Thor · 6 unmodified lines | ||
| 7 | 7 | |
| 8 | 8 | default_command :all |
| 9 | 9 | |
| 10 | + def initialize(*args) | |
| 11 | + $LOAD_PATH.unshift 'test' | |
| 12 | + super | |
| 13 | + end | |
| 14 | + | |
| 10 | 15 | desc 'all', 'Run all tests' |
| 11 | 16 | def all |
| 12 | − $LOAD_PATH.unshift 'test' | |
| 13 | 17 | Dir['test/**/*_test.rb'].map(&File.method(:expand_path)).each(&method(:require)) |
| 14 | 18 | end |
| 19 | + | |
| 20 | + desc 'docs', 'Run "Docs" tests' | |
| 21 | + def docs | |
| 22 | + Dir['test/lib/docs/**/*_test.rb'].map(&File.method(:expand_path)).each(&method(:require)) | |
| 23 | + end | |
| 24 | + | |
| 25 | + desc 'app', 'Run "App" tests' | |
| 26 | + def app | |
| 27 | + require 'app_test' | |
| 28 | + end | |
| 15 | 29 | end |