Sha256: c759fd0cd3fdb83649361d13969d2c43223107b136b873eaa96e0b7ae882ebb5
Contents?: true
Size: 679 Bytes
Versions: 2
Compression:
Stored size: 679 Bytes
Contents
require 'spec_helper' require 'active_support/core_ext/class' describe "ActiveSupport::Concern" do it "prepending module does not break class_attribute" do class SomeClass prepend Module.new def tester "instance" end class_attribute :tester, :instance_reader => false, :instance_writer => false self.tester = "class attribute" end expect(SomeClass.send :singleton_class?).to eq(false) expect(SomeClass.new.tester).to eq("instance") end it "prepending module does not break singleton_class check" do class Ana end Ana.prepend Module.new expect(Ana.send :singleton_class?).to eq(false) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
carrierwave-processor-1.0.3 | spec/active_support_spec.rb |
carrierwave-processor-1.0.2 | spec/active_support_spec.rb |