Sha256: 2883abd88d747e95f6fc473e3a4f1c350060f009fcb4a5a280260a8d8d5b5228

Contents?: true

Size: 736 Bytes

Versions: 8

Compression:

Stored size: 736 Bytes

Contents

require File.expand_path('../fixtures', __FILE__)
module Quickl
  describe "RubyTools#class_unqualified_name /" do
  
    subject{ RubyTools::class_unqualified_name(clazz) }
  
    describe "when called on unqualified class" do
      let(:clazz){ ::String }
      it{ should == "String" }
    end
  
    describe "when called on qualified class" do
      let(:clazz){ RubyTools }
      it{ should == "RubyTools" }
    end
  
    describe "when called on long qualified class" do
      let(:clazz){ Quickl::Fixtures::Utils }
      it{ should == "Utils" }
    end
  
    describe "when piped with parent_module" do
      let(:clazz){ RubyTools::parent_module(Quickl::Fixtures::Utils) }
      it{ should == "Fixtures" }
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
quickl-0.4.3 spec/ruby_tools/test_class_unqualified_name.rb
quickl-0.4.2 spec/ruby_tools/test_class_unqualified_name.rb
quickl-0.4.1 spec/ruby_tools/test_class_unqualified_name.rb
quickl-0.4.0 spec/ruby_tools/test_class_unqualified_name.rb
quickl-0.3.0 spec/ruby_tools/test_class_unqualified_name.rb
quickl-0.2.2 spec/ruby_tools/class_unqualified_name_spec.rb
quickl-0.2.1 spec/ruby_tools/class_unqualified_name_spec.rb
quickl-0.1.1 test/ruby_tools/class_unqualified_name.spec