Sha256: ceeb13094730b07020d8c9091e843a80571623fffb558079a3d6780eaef5f369

Contents?: true

Size: 490 Bytes

Versions: 9

Compression:

Stored size: 490 Bytes

Contents

require 'spec_helper'

describe String do
  describe "#deep_const_get" do
    it "should return a class" do
      expect("Socialization".deep_const_get).to eq(Socialization)
      expect("Socialization::ActiveRecordStores".deep_const_get).to eq(Socialization::ActiveRecordStores)
      expect("Socialization::ActiveRecordStores::Follow".deep_const_get).to eq(Socialization::ActiveRecordStores::Follow)

      expect { "Foo::Bar".deep_const_get }.to raise_error(NameError)
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
socialization-2.0.2 spec/string_spec.rb
socialization-2.0.1 spec/string_spec.rb
socialization-2.0.0 spec/string_spec.rb
socialization-1.2.3 spec/string_spec.rb
socialization-1.2.2 spec/string_spec.rb
socialization-1.2.1 spec/string_spec.rb
twrk-socialization-1.2.0 spec/string_spec.rb
twrk-socialization-0.0.1 spec/string_spec.rb
socialization-1.2.0 spec/string_spec.rb