Skip to content

Commit d560159

Browse files
committed
.
1 parent 0a33dfd commit d560159

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/rspec/uuid.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
require "rspec/expectations"
22

33
RSpec::Matchers.define :be_a_uuid do |version: nil|
4+
chain :of_version do |version|
5+
@version = version
6+
end
7+
48
match do |actual|
59
raise ArgumentError if @version && version
610

@@ -21,10 +25,6 @@
2125
end
2226
end
2327

24-
chain :of_version do |version|
25-
@version = version
26-
end
27-
2828
description do
2929
version ? "a UUID v#{version}" : "a UUID"
3030
end

0 commit comments

Comments
 (0)