Sha256: 4239538db0dce0a134904aad775a2447e4aa3b5a1e011dad031b8afb02fcc70f

Contents?: true

Size: 609 Bytes

Versions: 135

Compression:

Stored size: 609 Bytes

Contents

require 'spec_helper'

module Itamae
  describe Resource do
    describe ".parse_description" do
      context "with valid description" do
        it "returns type and name" do
          expect(described_class.parse_description("this-is_type[this-is_name]")).
            to eq(["this-is_type", "this-is_name"])
        end
      end

      context "with invalid description" do
        it "raises an error" do
          expect do
            described_class.parse_description("[this-is_type][this-is_name]")
          end.to raise_error(Itamae::Resource::ParseError)
        end
      end
    end
  end
end

Version data entries

135 entries across 135 versions & 3 rubygems

Version Path
itamae-mitsurin-0.30 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.29 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.28 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.27 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.26 spec/unit/lib/itamae/resource_spec.rb
itamae-1.9.7.pre spec/unit/lib/itamae/resource_spec.rb
itamae-1.9.6 spec/unit/lib/itamae/resource_spec.rb
itamae-1.9.6.pre spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.24 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.23 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.22 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.21 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.20 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.19 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.18 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.17 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.16 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.15 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.14 spec/unit/lib/itamae/resource_spec.rb
itamae-mitsurin-0.13 spec/unit/lib/itamae/resource_spec.rb