Sha256: be700328ef50de5821ff677b8ecc99a057690f9f6fe596a68c203f9bce1782d8
Contents?: true
Size: 450 Bytes
Versions: 39
Compression:
Stored size: 450 Bytes
Contents
require 'rspec/matchers' RSpec::Matchers.define :have_command_like do |regex| match do |command_list| @found = command_list.find{|c| c =~ regex } !!@found end failure_message_for_should do |command_list| "Didn't find a command matching #{regex} in commands:\n\n" + command_list.join("\n\n") end failure_message_for_should_not do |command_list| "Found unwanted command:\n\n#{@found}\n\n(matches regex #{regex})" end end
Version data entries
39 entries across 39 versions & 2 rubygems