| 38 | | unless options[:skip_testing] |
|---|
| 39 | | m.dependency "sequel_model_test", [@name] |
|---|
| | 38 | # Check to see if a scope has been set for which test framework to use. |
|---|
| | 39 | # If we try to run the dependency without an :rspec or :test_unit scope an |
|---|
| | 40 | # error will be raised. |
|---|
| | 41 | scopes =RubiGen::Base.sources.map{|a| a.filters if a.respond_to?(:filters)}.compact.uniq.flatten |
|---|
| | 42 | if scopes.include?(:rspec) || scopes.include?(:test_unit) |
|---|
| | 43 | unless options[:skip_testing] |
|---|
| | 44 | m.dependency "sequel_model_test", [@name] |
|---|
| | 45 | end |
|---|
| | 46 | else |
|---|
| | 47 | puts "\nSelect a scope for :rspec or :test_unit in script/generate if you want to generate test stubs\n\n" |
|---|