Sha256: b6c2f1da170df40c297153a96c1c83909ba12956ebd795743add5782ca1ee588

Contents?: true

Size: 923 Bytes

Versions: 17

Compression:

Stored size: 923 Bytes

Contents

require "librarian/dependency"

describe Librarian::Dependency do

  describe "validations" do

    context "when the name is blank" do
      it "raises" do
        expect { described_class.new("", [], nil) }.
          to raise_error(ArgumentError, %{name ("") must be sensible})
      end
    end

    context "when the name has leading whitespace" do
      it "raises" do
        expect { described_class.new("  the-name", [], nil) }.
          to raise_error(ArgumentError, %{name ("  the-name") must be sensible})
      end
    end

    context "when the name has trailing whitespace" do
      it "raises" do
        expect { described_class.new("the-name  ", [], nil) }.
          to raise_error(ArgumentError, %{name ("the-name  ") must be sensible})
      end
    end

    context "when the name is a single character" do
      it "passes" do
        described_class.new("R", [], nil)
      end
    end

  end

end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
librarian-puppet-0.9.10 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.9.9 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.9.8 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-maestrodev-0.9.7.5 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-maestrodev-0.9.7.4 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-maestrodev-0.9.7.3 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-maestrodev-0.9.7.2 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-maestrodev-0.9.7.1 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-maestrodev-0.9.7 vendor/librarian/spec/unit/dependency_spec.rb
librarian-0.0.25 spec/unit/dependency_spec.rb
librarian-puppet-0.9.7 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.9.6 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.9.5 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.9.4 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.9.3 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.9.2 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.9.2.pre vendor/librarian/spec/unit/dependency_spec.rb