]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commitdiff
Add test for README
authorAlex Harvey <Alex_Harvey@amp.com.au>
Sun, 11 Jun 2017 12:47:18 +0000 (22:47 +1000)
committerAlex Harvey <Alex_Harvey@amp.com.au>
Sun, 11 Jun 2017 12:47:18 +0000 (22:47 +1000)
This adds an Rspec test to fail the build if someone adds incorrectly
formatted heading markers again.

spec/unit/documentation/readme_spec.rb [new file with mode: 0644]

diff --git a/spec/unit/documentation/readme_spec.rb b/spec/unit/documentation/readme_spec.rb
new file mode 100644 (file)
index 0000000..d821bb2
--- /dev/null
@@ -0,0 +1,6 @@
+describe 'formatting in README.markdown' do
+  it 'should not contain badly formatted heading markers' do
+    content = File.read('README.markdown')
+    expect(content).to_not match /^#+[^# ]/
+  end
+end