Sha256: 32d3e9db165805067602afbcd01a1ca2c2849a6f49f8870dffb8ee0415017066
Contents?: true
Size: 905 Bytes
Versions: 2
Compression:
Stored size: 905 Bytes
Contents
require 'test_helper' describe Lolcommits::Plugin::Tranzlate do include Lolcommits::TestHelpers::GitRepo include Lolcommits::TestHelpers::FakeIO describe 'with a runner' do def runner @runner ||= Lolcommits::Runner.new end def plugin @plugin ||= Lolcommits::Plugin::Tranzlate.new(runner: runner) end describe '#enabled?' do it 'returns false by default' do plugin.enabled?.must_equal false end it 'returns true when configured' do plugin.configuration = { enabled: true } plugin.enabled?.must_equal true end end describe '#run_pre_capture' do before { commit_repo_with_message('my awesome commit') } it 'tranzlates the commit message' do in_repo { plugin.run_pre_capture } runner.message.must_match(/AWESUM COMMIT/) end after { teardown_repo } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lolcommits-tranzlate-0.1.1 | test/lolcommits/plugin/tranzlate_test.rb |
lolcommits-tranzlate-0.1.0 | test/lolcommits/plugin/tranzlate_test.rb |