Sha256: 958c46ab21bd58d67c2fbba29b2e49bfc427d8113272b37764bf93677669f031

Contents?: true

Size: 506 Bytes

Versions: 2

Compression:

Stored size: 506 Bytes

Contents

require_relative '../../spec_helper'

module Kamerling describe CoreExtensions::Main do
  describe '#req' do
    it 'raises a RuntimeError that a parameter is required' do
      -> { CoreExtensions::Main.req(:foo) }.must_raise(RuntimeError)
        .message.must_include 'param foo is required'
    end
  end

  describe '#warn_off' do
    it 'turns $VERBOSE off inside the block' do
      assert $VERBOSE
      CoreExtensions::Main.warn_off { refute $VERBOSE }
      assert $VERBOSE
    end
  end
end end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
kamerling-0.0.2 spec/kamerling/core_extensions/main_spec.rb
kamerling-0.0.1 spec/kamerling/core_extensions/main_spec.rb