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) }
Yes please :)
- Fork it
- Create your feature branch (
git checkout -b my-feature
) - Ensure the tests pass (
bundle exec rspec
) - Commit your changes (
git commit -am 'awesome new feature'
) - Push your branch (
git push origin my-feature
) - Create a Pull Request