Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update convention for custom matcher naming

  • Loading branch information...
commit e4d56a6c771782e4e08267a0d1fb4eef0f093fde 1 parent 7f1b070
@kana authored
Showing with 14 additions and 8 deletions.
  1. +14 −8 doc/vspec.txt
View
22 doc/vspec.txt
@@ -143,26 +143,32 @@ COMMANDS *vspec-commands*
Examples:
>
- function! True(actual_value)
+ function! ToBeTrue(actual_value)
return (type(a:actual_value) == type(0)
\ ? a:actual_value
\ : !!0)
endfunction
- call vspec#customize_matcher('toBeTrue',
- \ function('True'))
+ call vspec#customize_matcher(
+ \ 'to_be_true',
+ \ function('ToBeTrue')
+ \ )
- :Expect 123 toBeTrue
+ :Expect 123 to_be_true
" ===> good
- :Expect [123] toBeTrue
+ :Expect [123] to_be_true
" ===> bad
<
*vspec-predefined-custom-matchers*
The following custom matcheres are predefined:
- "toBeTrue"
+ "to_be_true"
Return true if {actual} value is true.
- "toBeFalse"
+ "to_be_false"
Return true if {actual} value is false.
+ "toBeTrue"
+ Same as "to_be_true". Deprecated.
+ "toBeFalse"
+ Same as "to_be_false". Deprecated.
:Expect {actual} not {matcher} {expected} *:Expect-not*
:Expect {actual} not {custom-matcher} [{arg}, ...]
@@ -242,7 +248,7 @@ vspec#call({funcname}, [{arg}, ...]) *vspec#call()*
vspec#customize_matcher({alias}, {function}) *vspec#customize_matcher()*
Register {function} as a |vspec-custom-matcher| which
- alias is {alias}.
+ alias is {alias}. {alias} should be snake_case.
vspec#hint({info}) *vspec#hint()*
Tell vspec "hint" information to use useful API to
Please sign in to comment.
Something went wrong with that request. Please try again.