test/unit/generator_generator_test.rb in sprout-1.1.5.pre vs test/unit/generator_generator_test.rb in sprout-1.1.7.pre
- old
+ new
@@ -17,9 +17,22 @@
teardown do
remove_file @temp
end
+ ['TestClassGenerator', 'test_class_generator', 'test_class', 'TestClass'].each do |input|
+
+ should "massage '#{input}' into appropriate value" do
+ @generator.input = "TestClassGenerator"
+ @generator.execute
+
+ test_file = File.join(@temp, 'test', 'unit', 'test_class_generator_test.rb')
+ assert_file test_file do |content|
+ assert_matches /TestClassGeneratorTest/, content
+ end
+ end
+ end
+
should "generate a new generator" do
@generator.input = 'fwee'
@generator.execute
lib_dir = File.join(@temp, 'lib')