Sha256: 6ad390621b95991144a44effb596ccbd51fbcb5171c3dea5725f75cf92b54de1

Contents?: true

Size: 850 Bytes

Versions: 8

Compression:

Stored size: 850 Bytes

Contents

require 'spec_helper'

describe Storey::NativeSchemaMatcher do

  describe '#matches?' do
    context 'when the schema is "$user"' do
      it 'should be true' do
        m = described_class.new('"$user"')
        expect(m.matches?).to be true
      end
    end

    context 'when the schema is public' do
      it 'should be true' do
        m = described_class.new('public')
        expect(m.matches?).to be true
      end
    end

    context 'when given comma separated string of schemas all matching' do
      it 'should be true' do
        m = described_class.new('"$user",public')
        expect(m.matches?).to be true
      end
    end

    context 'when the schema is neither "$user" or public' do
      it 'should be false' do
        m = described_class.new('something')
        expect(m.matches?).to be false
      end
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
storey-2.2.0 spec/storey/native_schema_matcher_spec.rb
storey-2.1.2 spec/storey/native_schema_matcher_spec.rb
storey-2.1.1 spec/storey/native_schema_matcher_spec.rb
storey-2.1.0 spec/storey/native_schema_matcher_spec.rb
storey-2.0.2 spec/storey/native_schema_matcher_spec.rb
storey-2.0.1 spec/storey/native_schema_matcher_spec.rb
storey-2.0.0 spec/storey/native_schema_matcher_spec.rb
storey-1.0.0 spec/storey/native_schema_matcher_spec.rb