lib/padrino-gen/generators/components/tests/testspec.rb in padrino-gen-0.10.7 vs lib/padrino-gen/generators/components/tests/testspec.rb in padrino-gen-0.11.0
- old
+ new
@@ -57,10 +57,9 @@
require_dependencies 'test-spec', :require => 'test/spec', :group => 'test'
insert_test_suite_setup TESTSPEC_SETUP
create_file destination_root("test/test.rake"), TESTSPEC_RAKE
end
-# Generates a controller test given the controllers name
def generate_controller_test(name)
testspec_contents = TESTSPEC_CONTROLLER_TEST.gsub(/!NAME!/, name.to_s.underscore.camelize)
controller_test_path = File.join('test',options[:app],'controllers',"#{name.to_s.underscore}_controller_test.rb")
create_file destination_root(controller_test_path), testspec_contents, :skip => true
end