Sha256: e892a81ec0fb897785ded80125a37a7be24cf443085c90615332572cbb4d313d
Contents?: true
Size: 637 Bytes
Versions: 28
Compression:
Stored size: 637 Bytes
Contents
require_relative '../../spec_helper' require_lib 'reek/context/statement_counter' RSpec.describe Reek::Context::StatementCounter do let(:counter) { described_class.new } describe '#increase_by' do it 'does not increase if passed a falsy value' do counter.increase_by(nil) expect(counter.value).to eq 0 end it 'increase by the lengh of the passed in argument' do counter.increase_by([1, 2, 3]) expect(counter.value).to eq 3 end it 'accumulates increases' do counter.increase_by([1, 2, 3]) counter.increase_by([1, 2, 3]) expect(counter.value).to eq 6 end end end
Version data entries
28 entries across 26 versions & 2 rubygems