Skip to content

Commit

Permalink
test: Add tests for git_stats version
Browse files Browse the repository at this point in the history
Close #1
  • Loading branch information
mishina2228 committed Sep 27, 2022
1 parent 2295a2d commit 63059bf
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions spec/integration/git_stats/cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,27 @@
end
end
end

describe '#version' do
context 'when version is passed' do
it 'shows the version of this library' do
expect { described_class.start(['version']) }
.to output("NovaGitStats #{GitStats::VERSION}\n").to_stdout
end
end

context 'when --version is passed' do
it 'shows the version of this library' do
expect { described_class.start(['--version']) }
.to output("NovaGitStats #{GitStats::VERSION}\n").to_stdout
end
end

context 'when -v is passed' do
it 'shows the version of this library' do
expect { described_class.start(['-v']) }
.to output("NovaGitStats #{GitStats::VERSION}\n").to_stdout
end
end
end
end

0 comments on commit 63059bf

Please sign in to comment.