Skip to content

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) }

Installation

# Gemfile
gem "rspec-uuid"

or

gem install rspec-uuid

About

RSpec matcher for UUIDs

Resources

Stars

27 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages