Sha256: 47f16b5868dd81f76f65eccf48357987476a3f3428089e7226781647382a4906

Contents?: true

Size: 1.06 KB

Versions: 85

Compression:

Stored size: 1.06 KB

Contents

require 'pact_broker/config/space_delimited_string_list'

module PactBroker
  module Config
    describe SpaceDelimitedStringList do
      describe "parse" do
        subject { SpaceDelimitedStringList.parse(input) }

        context "when input is ''" do
          let(:input) { "" }

          it { is_expected.to eq [] }

          its(:to_s) { is_expected.to eq input }
        end

        context "when input is 'foo bar'" do
          let(:input) { "foo bar" }

          it { is_expected.to eq ["foo", "bar"] }

          it { is_expected.to be_a SpaceDelimitedStringList }

          its(:to_s) { is_expected.to eq input }
        end

        context "when input is '/foo.*/'" do
          let(:input) { "/foo.*/" }

          it { is_expected.to eq [/foo.*/] }

          its(:to_s) { is_expected.to eq input }
        end

        context "when input is '/foo\\.*/' (note double backslash)" do
          let(:input) { "/foo\\.*/" }

          it { is_expected.to eq [/foo\.*/] }

          its(:to_s) { is_expected.to eq input }
        end
      end
    end
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
pact_broker-2.79.1 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.79.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.78.1 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.78.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.77.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.76.2 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.76.1 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.76.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.75.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.74.1 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.74.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.73.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.72.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.71.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.70.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.69.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.68.1 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.68.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.67.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb
pact_broker-2.66.0 spec/lib/pact_broker/config/space_delimited_string_list_spec.rb