Permalink
Browse files

added generator for a slice

  • Loading branch information...
1 parent 29be750 commit f73cf978b7094b4c30ed52de156f30d8dbb99b40 @mattetti committed Nov 13, 2008
Showing with 18 additions and 0 deletions.
  1. +7 −0 step-by-step-app-testing/slice-steps/generate_slice.rb
  2. +11 −0 step-by-step-app-testing/test-app.thor
View
7 step-by-step-app-testing/slice-steps/generate_slice.rb
@@ -0,0 +1,7 @@
+module Step
+ def generate_slice_and_git_init
+ puts " > generating a slice called: #{name}"
+
+ `merb-gen slice #{name}`
+ end
+end
View
11 step-by-step-app-testing/test-app.thor
@@ -146,4 +146,15 @@ class App < Thor
end
+ desc "generate_slice SLICE_NAME", "generate a test slice"
+ def generate_slice(app_name="slice-app")
+ load_steps('shared-steps')
+ load_steps('slice-steps')
+ Step.app_name = app_name
+
+ step :preinit_remove_old_generated_app
+ step :generate_app_and_git_init
+ step :run_app_specs
+
+ end
end

0 comments on commit f73cf97

Please sign in to comment.