Sha256: c43db95ceb52ebaa48254f12880a1dd2876a3826a7d492e81843e99b2b5d2cc8

Contents?: true

Size: 638 Bytes

Versions: 1

Compression:

Stored size: 638 Bytes

Contents

require_relative '../../spec_helper'
require_relative '../../../lib/kamerling/core_extensions/main'

module Kamerling
  describe CoreExtensions::Main do
    describe '#warn_off' do
      before { @verbose = $VERBOSE }
      after  { $VERBOSE = @verbose }

      it 'when $VERBOSE is on it turns it off inside the block and back on' do
        $VERBOSE = true
        CoreExtensions::Main.warn_off { refute $VERBOSE }
        assert $VERBOSE
      end

      it 'when $VERBOSE is off it keeps it off' do
        $VERBOSE = false
        CoreExtensions::Main.warn_off { refute $VERBOSE }
        refute $VERBOSE
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
kamerling-0.0.3 spec/kamerling/core_extensions/main_spec.rb