Sha256: cf68498b7a356957e715ba4f59791840f6f8f604dbbcb2a25ac7f069837496f3

Contents?: true

Size: 394 Bytes

Versions: 19

Compression:

Stored size: 394 Bytes

Contents

#
module ModuleHelpers
  def self.included(base)
    base.class_eval do
      let :includer_class do
        mod = described_class
        Class.new { include mod }
      end

      let(:includer_obj) { includer_class.new }

      let :extender_class do
        mod = described_class
        Class.new { extend mod }
      end

      let(:extender_obj) { extender_class.new }
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
admin_it-1.3.8 spec/support/module_helpers.rb
admin_it-1.3.7 spec/support/module_helpers.rb
admin_it-1.3.6 spec/support/module_helpers.rb
admin_it-1.3.5 spec/support/module_helpers.rb
admin_it-1.3.4 spec/support/module_helpers.rb
admin_it-1.3.3 spec/support/module_helpers.rb
admin_it-1.3.2 spec/support/module_helpers.rb
admin_it-1.3.1 spec/support/module_helpers.rb
admin_it-1.3.0 spec/support/module_helpers.rb
admin_it-1.2.8 spec/support/module_helpers.rb
admin_it-1.2.7 spec/support/module_helpers.rb
admin_it-1.2.6 spec/support/module_helpers.rb
admin_it-1.2.5 spec/support/module_helpers.rb
admin_it-1.2.4 spec/support/module_helpers.rb
admin_it-1.2.3 spec/support/module_helpers.rb
admin_it-1.2.2 spec/support/module_helpers.rb
admin_it-1.2.1 spec/support/module_helpers.rb
admin_it-1.2.0 spec/support/module_helpers.rb
admin_it-1.1.0 spec/support/module_helpers.rb