Sha256: 4ac7d52ce912e95b16fbc7e1780241108d3d96e2ef2b672f018736d435a60ab0

Contents?: true

Size: 386 Bytes

Versions: 3

Compression:

Stored size: 386 Bytes

Contents

module LazyConstMixins
  def defines_consts(*consts)
    consts.each do |const|
      it "defined constant #{const} is an instance of #{described_class}" do
        described_class.public_send(const.to_sym).should be_instance_of(described_class)
      end
    end
  end
  alias_method :defines_const, :defines_consts
end

RSpec.configure do |config|
  config.extend LazyConstMixins
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lazy_const-0.1.3 lib/lazy_const/spec.rb
lazy_const-0.1.2 lib/lazy_const/spec.rb
lazy_const-0.1.1 lib/lazy_const/spec.rb