Skip to content

Commit

Permalink
TB-46 #time 5m Add tag range test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmet Sezgin Duran committed Aug 22, 2014
1 parent fe8caf7 commit 94e3c7d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/basics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@


after do
FileUtils.rm 'CHANGELOG.md' if File.exists?('CHANGELOG.md')
FileUtils.rm 'SampleChangeLog.md' if File.exists?('SampleChangeLog.md')
FileUtils.rm 'MyChangelog.md' if File.exists?('MyChangelog.md')
FileUtils.rm 'CHANGELOG.md' if File.exists? File.join(repo, 'CHANGELOG.md')
FileUtils.rm 'SampleChangeLog.md' if File.exists? File.join(repo, 'SampleChangeLog.md')
FileUtils.rm 'MyChangelog.md' if File.exists? File.join(repo, 'MyChangelog.md')
end
end
23 changes: 23 additions & 0 deletions spec/results/TagRangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
0.4.0

#### 0.4.0
* [daec484](../../commit/daec484) - __(Ahmet Sezgin Duran)__ Bump version 0.4.0
* [5e3fb56](../../commit/5e3fb56) - __(Ahmet Sezgin Duran)__ Merge tag '0.3.0' into develop

0.3.0

#### 0.3.0
* [ba05c7f](../../commit/ba05c7f) - __(Ahmet Sezgin Duran)__ Bump version 0.3.0
* [c5882ea](../../commit/c5882ea) - __(Ahmet Sezgin Duran)__ Merge tag '0.2.0' into develop

0.2.0

#### 0.2.0
* [25aaf56](../../commit/25aaf56) - __(Ahmet Sezgin Duran)__ Bump version 0.2.0
* [c72db50](../../commit/c72db50) - __(Ahmet Sezgin Duran)__ Merge tag '0.1.0' into develop

0.1.0

#### 0.1.0
* [c64a2f6](../../commit/c64a2f6) - __(Ahmet Sezgin Duran)__ Bump version 0.1.0,
* [c7c56eb](../../commit/c7c56eb) - __(Ahmet Sezgin DURAN)__ Initial commit
23 changes: 23 additions & 0 deletions spec/tag_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
require 'spec_helper'

repo = File.join(File.dirname(__FILE__), 'katip-sample-repo')

describe 'Tag system' do
before do
Dir.chdir repo
end

it 'creates the change log with the given tag range' do
change_logger = Katip::ChangeLogger.new from: '0.1.0', to: '0.4.0'
change_logger.log_changes

original_file = Digest::MD5.file('../results/TagRangeLog.md').to_s
result_file = Digest::MD5.file('CHANGELOG.md').to_s

expect(result_file).to eq original_file
end

after do
FileUtils.rm 'CHANGELOG.md' if File.exists? File.join(repo, 'CHANGELOG.md')
end
end

0 comments on commit 94e3c7d

Please sign in to comment.