Sha256: 15199e7cbee43bde0be00d60f39de0eff73ca978352c7bfd4dd47c85ee5a17a2

Contents?: true

Size: 341 Bytes

Versions: 1

Compression:

Stored size: 341 Bytes

Contents

describe :MModule do
  subject { MModule }

  describe '.used' do
    it 'defines extended hook with given block' do
      my = Class.new(subject) do
        used do |at|
          @used = true
        end
        attr_reader :used
      end.new
      expect { my.send :extend, my }.to change { my.used }.from(nil).to true
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
meta_module-0.0.1 spec/unit/meta_module/m_module/class_methods/used_spec.rb