Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added generator for a slice

  • Loading branch information...
commit f73cf978b7094b4c30ed52de156f30d8dbb99b40 1 parent 29be750
@mattetti authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.