test/unit/generator_test.rb in sprout-1.1.4.pre vs test/unit/generator_test.rb in sprout-1.1.5.pre
- old
+ new
@@ -56,10 +56,17 @@
assert_matches /public class SomeProject/, content
assert_matches /public function SomeProject/, content
end
end
+ should "show template paths and nothing else" do
+ @generator.parse! ['--show-template-paths']
+ output = @generator.execute
+
+ assert_equal 7, output.split("\n").size
+ end
+
should "not clobber existing files" do
dir = File.join(@fixture, 'some_project', 'src')
FileUtils.mkdir_p dir
File.open File.join(dir, 'SomeProject.as'), 'w+' do |f|
f.write "Hello World"
@@ -147,10 +154,10 @@
assert_equal 3, FakeGenerator.static_parameter_collection.size
assert_equal 2, FakeGenerator.static_default_value_collection.size
end
should "not update superclass parameter collection" do
- assert_equal 6, Sprout::Generator::Base.static_parameter_collection.size
+ assert_equal 7, Sprout::Generator::Base.static_parameter_collection.size
assert_equal 1, Sprout::Generator::Base.static_default_value_collection.size
end
##
# TODO: Add ability to prompt the user if requested files already exist,