Sha256: 267747d2a0eddb2f8088accbfa057b33f431b6311335d09b6ce1f8a35eee4680

Contents?: true

Size: 288 Bytes

Versions: 9

Compression:

Stored size: 288 Bytes

Contents

require "spec_helper"

describe AttrExtras do
  it "mixes helpers into all Modules (and thus all Classes)" do
    mod = Module.new do
      pattr_initialize :name
    end

    klass = Class.new do
      include mod
    end

    klass.new("Hello").send(:name).must_equal "Hello"
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
attr_extras-6.2.1 spec/attr_extras_spec.rb
attr_extras-6.2.0 spec/attr_extras_spec.rb
attr_extras-6.1.0 spec/attr_extras_spec.rb
attr_extras-5.2.0 spec/attr_extras_spec.rb
attr_extras-5.1.0 spec/attr_extras_spec.rb
attr_extras-5.0.0 spec/attr_extras_spec.rb
attr_extras-4.6.0 spec/attr_extras_spec.rb
attr_extras-4.5.0 spec/attr_extras_spec.rb
attr_extras-4.4.0 spec/attr_extras_spec.rb