Permalink
Browse files

Fix test_rspec_model_generator and test_story_generator; I had misund…

…erstood the parameters to run_generator.
  • Loading branch information...
1 parent 8fd2211 commit babf68fb7c287ee6384354a6c856ca91ceef4677 @avh4 avh4 committed Jul 5, 2008
Showing with 8 additions and 10 deletions.
  1. +3 −4 test/test_rspec_model_generator.rb
  2. +5 −6 test/test_story_generator.rb
@@ -27,11 +27,10 @@ def teardown
# bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
def test_generator_without_options
- name = "myapp"
- model = "rspec_model"
- run_generator(model, [name], sources)
+ name = "model"
+ run_generator("rspec_model", [name], sources)
assert_generated_file "spec/spec_helper.rb"
- assert_generated_file "spec/#{model}_spec.rb"
+ assert_generated_file "spec/#{name}_spec.rb"
end
private
@@ -27,15 +27,14 @@ def teardown
# bare_teardown - place this in teardown method to destroy the TMP_ROOT or APP_ROOT folder after each test
def test_generator_without_options
- name = "myapp"
- story = "story"
- run_generator(story, [name], sources)
+ name = "story"
+ run_generator("story", [name], sources)
assert_directory_exists "stories"
assert_generated_file "stories/story_helper.rb"
- assert_generated_file "stories/#{story}_story"
- assert_generated_file "stories/#{story}_story.rb"
+ assert_generated_file "stories/#{name}_story"
+ assert_generated_file "stories/#{name}_story.rb"
assert_directory_exists "stories/steps"
- assert_genreated_file "stories/steps/#{story}_steps.rb"
+ assert_generated_file "stories/steps/#{name}_steps.rb"
end
private

0 comments on commit babf68f

Please sign in to comment.