spec/licensee/project_files/readme_spec.rb in licensee-8.6.1 vs spec/licensee/project_files/readme_spec.rb in licensee-8.7.0

- old
+ new

@@ -48,10 +48,18 @@ it 'returns the license' do expect(license).to eql('hello world') end end + context 'after an underlined header' do + let(:content) { "License\n-------\n\nhello world" } + + it 'returns the license' do + expect(license).to eql('hello world') + end + end + context 'With a strangely cased heading' do let(:content) { "## LICENSE\n\nhello world" } it 'returns the license' do expect(license).to eql('hello world') @@ -66,9 +74,25 @@ end end context 'with trailing content' do let(:content) { "## License\n\nhello world\n\n# Contributing" } + + it 'returns the license' do + expect(license).to eql('hello world') + end + end + + context 'with trailing content that has an underlined header' do + let(:content) { "# License\n\nhello world\n\nContributing\n====" } + + it 'returns the license' do + expect(license).to eql('hello world') + end + end + + context 'with trailing content that has a hashes-based header' do + let(:content) { "# License\n\nhello world\n\n# Contributing" } it 'returns the license' do expect(license).to eql('hello world') end end