Sha256: 3ae0bc1f83c9594c0230c11a21411d9fbc10807d59103481fa6b0677437cd155

Contents?: true

Size: 584 Bytes

Versions: 12

Compression:

Stored size: 584 Bytes

Contents

RSpec.describe LightServiceExt::Regex do
  describe '.match?' do
    subject(:matched) { described_class.match?(type, value) }

    let(:value) { nil }
    let(:type) { nil }

    describe ':email' do
      let(:type) { :email }

      context 'with valid email' do
        let(:value) { 'email@domain.com' }

        it 'returns true' do
          expect(matched).to be_truthy
        end
      end

      context 'with invalid email' do
        let(:value) { 'emaild.g' }

        it 'returns false' do
          expect(matched).to be_falsey
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
light-service-ext-0.1.11 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.10 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.9 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.8 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.7 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.6 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.5 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.4 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.3 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.2 spec/light-service-ext/regex_spec.rb
light-service-ext-0.1.1 spec/light_service_ext/regex_spec.rb
light-service-ext-0.1.0 spec/light_service_ext/regex_spec.rb