Sha256: 2d8a140e3a324abaab93d6c876572d4a0d90a4be6ccd7a770006b19bea30c7d0
Contents?: true
Size: 701 Bytes
Versions: 92
Compression:
Stored size: 701 Bytes
Contents
(defined?(RSpec) && RSpec || defined?(Spec) && Spec)::Matchers.define :have_categories do |*expected| match do |results| extract_categories(actual) == expected end failure_message_for_should do |results| "expected categories #{extract_categories(results)} to be named and ordered as #{expected}" end failure_message_for_should_not do |results| "expected categories #{extract_categories(results)} not to be named and ordered as #{expected}" end description do "be categories named and ordered as #{expected}" end def extract_categories results results.allocations.map do |allocation| allocation[3].map { |combination| combination[0] } end end end
Version data entries
92 entries across 92 versions & 1 rubygems