Sha256: 92acad02dde3e2ee3396bb590087c4ba24c51573073881302647e3b7669a7f45

Contents?: true

Size: 270 Bytes

Versions: 10

Compression:

Stored size: 270 Bytes

Contents

require_relative "spec_helper"

describe AttrExtras, "in modules" do
  it "is supported" 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

10 entries across 10 versions & 1 rubygems

Version Path
attr_extras-4.3.0 spec/attr_extras_spec.rb
attr_extras-4.2.0 spec/attr_extras_spec.rb
attr_extras-4.1.0 spec/attr_extras_spec.rb
attr_extras-4.0.0 spec/attr_extras_spec.rb
attr_extras-3.2.0 spec/attr_extras_spec.rb
attr_extras-3.1.0 spec/attr_extras_spec.rb
attr_extras-3.0.0 spec/attr_extras_spec.rb
attr_extras-2.3.0 spec/attr_extras_spec.rb
attr_extras-2.2.3 spec/attr_extras_spec.rb
attr_extras-2.2.2 spec/attr_extras_spec.rb