lib/generators/dry_crud/templates/test/custom_assertions.rb
def assert_count(expected, regexp, string, message = "")
    actual = string.scan(regexp).size
    full_message = build_message(message, "<?> expected to occur ? time(s), but occured ? time(s) in \n<?>.",
                                 regexp, expected, actual, string)
    assert_block(full_message) { expected == actual }
  end
# Asserts that regexp occurs exactly expected times in string.
Asserts that regexp occurs exactly expected times in string.
Asserts that regexp occurs exactly expected times in string .
def assert_count(expected, regexp, string, message = "")
    actual = string.scan(regexp).size
    full_message = build_message(message, "<?> expected to occur ? time(s), but occured ? time(s) in \n<?>.",
                                 regexp, expected, actual, string)
    assert_block(full_message) { expected == actual }
  end
def assert_count ( expected , regexp , string , message = "" ) actual = string . scan ( regexp ) . size full_message = build_message ( message , "<?> expected to occur ? time(s), but occured ? time(s) in \n<?>." , regexp , expected , actual , string ) assert_block ( full_message ) { expected == actual } end
Asserts that regexp occurs exactly expected times in string.
Asserts that regexp occurs exactly expected times in string .
expected
regexp
string
message