spec/ruby-enum/enum_spec.rb in ruby-enum-0.7.0 vs spec/ruby-enum/enum_spec.rb in ruby-enum-0.7.1
- old
+ new
@@ -167,6 +167,14 @@
end
it do
expect { EmptyEnums::ORANGE }.to raise_error Ruby::Enum::Errors::UninitializedConstantError
end
end
+
+ context 'when a constant is redefined in a global namespace' do
+ before do
+ RED = 'black'.freeze
+ end
+
+ it { expect(Colors::RED).to eq 'red' }
+ end
end