Sha256: 9dba452b1b0147be6774acf740e84dd7c4201b24147af1729d2add87e8a94d3e

Contents?: true

Size: 338 Bytes

Versions: 5

Compression:

Stored size: 338 Bytes

Contents

require 'spec_helper'
module Alf
  describe Tools, "class_name" do

    let(:tools){ Object.new.extend(Tools) }

    it "should work on top-level namespaces" do
      tools.class_name(Alf).should eq(:Alf)
    end

    it "should work on non top-level namespaces" do
      tools.class_name(Alf::Tools).should eq(:Tools)
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-0.12.2 spec/unit/alf-core/tools/test_class_name.rb
alf-0.12.1 spec/unit/alf-core/tools/test_class_name.rb
alf-0.12.0 spec/unit/alf-core/tools/test_class_name.rb
alf-0.11.1 spec/unit/alf-core/tools/test_class_name.rb
alf-0.11.0 spec/unit/alf-core/tools/test_class_name.rb