Sha256: d0e009ad80d3580c8a23c3b3217ea1da8b16de0a07497d507abd922d74b43d62

Contents?: true

Size: 689 Bytes

Versions: 3

Compression:

Stored size: 689 Bytes

Contents

require 'spec_helper'

describe "Parser" do

  let(:parser) { Analyst.new("./spec/fixtures/music.rb") }

  describe "#top_level_classes" do

    it "lists top-level classes" do
      class_names = parser.top_level_classes.map(&:full_name)
      expect(class_names).to match_array ["Artist", "Singer", "Song"]
    end

  end

  describe "#classes" do
    it "lists all classes from recursive search" do
      all_classes = %w[Artist Singer Song
                       Instruments::Stringed Instruments::Guitar
                       Performances::Equipment::Amp]

      class_names = parser.classes.map(&:full_name)

      expect(class_names).to match_array all_classes
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
analyst-0.14.2 spec/parser_spec.rb
analyst-0.14.1 spec/parser_spec.rb
analyst-0.14.0 spec/parser_spec.rb