spec/bogus/copies_classes_spec.rb in bogus-0.1.2 vs spec/bogus/copies_classes_spec.rb in bogus-0.1.3
- old
+ new
@@ -56,10 +56,19 @@
let(:copies_classes) { Bogus.inject.copies_classes }
let(:fake_class) { copies_classes.copy(klass) }
let(:fake) { fake_class.new }
class FooWithInstanceMethods
+ CONST = "the const"
include SampleMethods
+ end
+
+ context "nested constants" do
+ let(:klass) { FooWithInstanceMethods }
+
+ it "does not overwrite nested constants" do
+ fake_class::CONST.should == "the const"
+ end
end
context "instance methods" do
let(:klass) { FooWithInstanceMethods }
subject{ fake }