Sha256: 687510443730bd4edf8f12503dc13b29eaf97b740714f6f2629eb956a773d2b5

Contents?: true

Size: 745 Bytes

Versions: 9

Compression:

Stored size: 745 Bytes

Contents

require 'spec_helper'
require_relative '../lib/society/cli'

describe Society::CLI do

  describe "#from" do

    let(:parser) { Society::Parser.new([]) }

    it "invokes Society with a path" do
      allow(parser).to receive(:report)
      expect(Society).to receive(:new) { parser }
      Society::CLI.new.from("./spec/fixtures")
    end

    it "calls report on a Parser instance" do
      expect(parser).to receive(:report)
      allow(Society).to receive(:new) { parser }
      Society::CLI.new.from("./spec/fixtures")
    end

    it "handles globs" do
      expect(parser).to receive(:report)
      allow(Society).to receive(:new) { parser }
      Society::CLI.new.from("#{Dir.getwd}/lib/society/{parser.rb,node.rb}")
    end
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
society-2.0.1 spec/cli_spec.rb
society-2.0 spec/cli_spec.rb
society-1.7 spec/cli_spec.rb
society-1.6 spec/cli_spec.rb
society-1.5.2 spec/cli_spec.rb
society-1.5.1 spec/cli_spec.rb
society-1.5.0 spec/cli_spec.rb
society-1.4.2 spec/cli_spec.rb
society-1.4.1 spec/cli_spec.rb