Skip to content

dpep/rspec-uuid

Folders and files

NameName
Last commit message
Last commit date
Dec 5, 2024
Apr 8, 2024
Aug 8, 2024
May 13, 2022
May 13, 2022
Feb 13, 2023
May 13, 2022
Apr 8, 2024
May 13, 2022
Dec 16, 2024
May 13, 2022
Jun 9, 2022
Apr 7, 2024

Repository files navigation

rspec-uuid

Gem codecov

An RSpec matcher for UUIDs.

require "rspec/uuid"


it { is_expected.to be_a_uuid }

# check the version
it { is_expected.to be_a_uuid(version: 4) }
it { is_expected.to be_a_uuid.of_version(4) }

# compose with other matchers
it { expect(data).to include(uuid: a_uuid) }

Contributing

Yes please :)

  1. Fork it
  2. Create your feature branch (git checkout -b my-feature)
  3. Ensure the tests pass (bundle exec rspec)
  4. Commit your changes (git commit -am 'awesome new feature')
  5. Push your branch (git push origin my-feature)
  6. Create a Pull Request