Sha256: db5135edf1649aff345f8a90331b554a3598febfe49dd8e89e7b586cd31aa31b

Contents?: true

Size: 788 Bytes

Versions: 16

Compression:

Stored size: 788 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

  end

end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
librarian-0.0.24 spec/unit/dependency_spec.rb
librarian-puppet-0.9.1 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.9.0 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.0.1.pre2 vendor/librarian/spec/unit/dependency_spec.rb
librarian-puppet-0.0.1.pre vendor/librarian/spec/unit/dependency_spec.rb
librarian-0.0.23 spec/unit/dependency_spec.rb
librarian-0.0.22 spec/unit/dependency_spec.rb
librarian-0.0.21 spec/unit/dependency_spec.rb
librarian-0.0.20 spec/unit/dependency_spec.rb
librarian-0.0.19 spec/unit/dependency_spec.rb
librarian-0.0.18 spec/unit/dependency_spec.rb
librarian-0.0.17 spec/unit/dependency_spec.rb
librarian-0.0.16 spec/unit/dependency_spec.rb
librarian-0.0.15 spec/unit/dependency_spec.rb
librarian-0.0.14 spec/unit/dependency_spec.rb
librarian-0.0.13 spec/unit/dependency_spec.rb