diff --git a/spec/compiler/crystal/tools/init_spec.cr b/spec/compiler/crystal/tools/init_spec.cr index fc582ba8a473..ec2070cc9039 100644 --- a/spec/compiler/crystal/tools/init_spec.cr +++ b/spec/compiler/crystal/tools/init_spec.cr @@ -38,12 +38,14 @@ module Crystal end describe_file "example/.gitignore" do |gitignore| + gitignore.should contain("/docs/") gitignore.should contain("/.shards/") gitignore.should contain("/shard.lock") gitignore.should contain("/lib/") end describe_file "example_app/.gitignore" do |gitignore| + gitignore.should contain("/docs/") gitignore.should contain("/.shards/") gitignore.should_not contain("/shard.lock") gitignore.should contain("/lib/") diff --git a/src/compiler/crystal/tools/init/template/gitignore.ecr b/src/compiler/crystal/tools/init/template/gitignore.ecr index 824437fa0962..1141fbd8356c 100644 --- a/src/compiler/crystal/tools/init/template/gitignore.ecr +++ b/src/compiler/crystal/tools/init/template/gitignore.ecr @@ -1,4 +1,4 @@ -/doc/ +/docs/ /lib/ /bin/ /.shards/