Sha256: 1555709a9342596bcf57621f1d78e92323db350df0baa1d283a5ce2b58075c4f
Contents?: true
Size: 945 Bytes
Versions: 3
Compression:
Stored size: 945 Bytes
Contents
# frozen_string_literal: true 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
3 entries across 3 versions & 1 rubygems