Sha256: a0af0b1c07a1067ac871a4f63d7af96d6cb1f26a71525fc5eb5a58fb7c9aacc3
Contents?: true
Size: 938 Bytes
Versions: 14
Compression:
Stored size: 938 Bytes
Contents
require 'spec_helper' module TestModule module TestSubModule class TestClass end end end describe do context "#all_the_modules" do it "should return all the modules and classes for a object recursivley" do expect(TestModule.all_the_modules). to eq([TestModule, TestModule::TestSubModule, TestModule::TestSubModule::TestClass]) end end context "#keys_to_sym" do it "should convert all hash keys to symbols" do expect({ 'key' => 'val' }.keys_to_sym).to eq({ key: 'val' }) end end context "#keys_to_string" do it "should convert all hash keys to string" do expect({ key: 'val' }.keys_to_s).to eq({ 'key' => 'val' }) end end context "#underscore" do it "should convert camel case to snack case" do expect('TestCamelCase123'.underscore).to eq('test_camel_case123') expect('Test123CamelCase'.underscore).to eq('test123_camel_case') end end end
Version data entries
14 entries across 14 versions & 1 rubygems