Skip to content

Commit

Permalink
annotate exemplars with unit tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
peterpunk committed Aug 14, 2009
1 parent 8ecd23e commit fcd69fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/annotate/annotate_models.rb
Expand Up @@ -10,7 +10,8 @@ class << self
UNIT_TEST_DIR = File.join("test", "unit" )
SPEC_MODEL_DIR = File.join("spec", "models")
# Object Daddy http://github.com/flogic/object_daddy/tree/master
EXEMPLARS_DIR = File.join("spec", "exemplars")
EXEMPLARS_SPEC_DIR = File.join("spec", "exemplars")
EXEMPLARS_TEST_DIR = File.join("test", "exemplars")

def model_dir
@model_dir || "app/models"
Expand Down Expand Up @@ -151,7 +152,8 @@ def annotate(klass, file, header,options={})
[
File.join(UNIT_TEST_DIR, "#{model_name}_test.rb"), # test
File.join(SPEC_MODEL_DIR, "#{model_name}_spec.rb"), # spec
File.join(EXEMPLARS_DIR, "#{model_name}_exemplar.rb"), # Object Daddy
File.join(EXEMPLARS_TEST_DIR, "#{model_name}_exemplar.rb"), # Object Daddy
File.join(EXEMPLARS_SPEC_DIR, "#{model_name}_exemplar.rb"), # Object Daddy
].each { |file| annotate_one_file(file, info) }

FIXTURE_DIRS.each do |dir|
Expand Down

0 comments on commit fcd69fd

Please sign in to comment.