Sha256: b05087797b68fe0984d67d1acdc0620b352060beb4f3d1b65183ab080591b88e

Contents?: true

Size: 1.24 KB

Versions: 47

Compression:

Stored size: 1.24 KB

Contents

- name: string with i option - matches
  document:
    title: King
  query:
    title:
      $regex: k..g
      $options: i
  matches: true

- name: string with i option - does not match
  document:
    title: King
  query:
    title:
      $regex: kkkg
      $options: i
  matches: false

- name: string with m option - matches
  document:
    title: "King\nSir"
  query:
    title:
      $regex: ^Sir
      $options: m
  matches: true

- name: string with m option - does not match
  document:
    title: "King\nSir"
  query:
    title:
      $regex: ^ir
      $options: m
  matches: false

- name: options given without regex
  document:
    title: King
  query:
    title:
      $options: i
  error: true

- name: options are given first
  document:
    title: King
  query:
    title:
      $options: i
      $regex: k..g
  matches: true

- name: regex with i option - matches
  document:
    title: King
  query:
    title:
      $regex: !ruby/regexp /k..g/
      $options: i
  matches: true
  pending: https://jira.mongodb.org/browse/MONGOID-4936

- name: regex with i option - does not match
  document:
    title: King
  query:
    title:
      $regex: !ruby/regexp /kkkg/
      $options: i
  matches: false
  pending: https://jira.mongodb.org/browse/MONGOID-4936

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
mongoid-9.0.5 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.1.9 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.0.9 spec/integration/matcher_operator_data/regex_options.yml
mongoid-9.0.4 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.1.8 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.1.7 spec/integration/matcher_operator_data/regex_options.yml
mongoid-9.0.3 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.1.6 spec/integration/matcher_operator_data/regex_options.yml
mongoid-9.0.2 spec/integration/matcher_operator_data/regex_options.yml
mongoid-9.0.1 spec/integration/matcher_operator_data/regex_options.yml
mongoid-9.0.0 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.0.8 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.1.5 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.1.4 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.0.7 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.1.3 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.1.2 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.0.6 spec/integration/matcher_operator_data/regex_options.yml
mongoid-7.5.4 spec/integration/matcher_operator_data/regex_options.yml
mongoid-8.1.1 spec/integration/matcher_operator_data/regex_options.yml