specky/snippets/rspec.snippets
branchvim-stuff
changeset 14 c7136005d459
parent 12 a9f1ce3766d1
child 19 763cef799c74
equal deleted inserted replaced
13:bf10296833e4 14:c7136005d459
   133 snippet shbp
   133 snippet shbp
   134 	${1:target}.should ${2:be_${3:predicate}} ${4}
   134 	${1:target}.should ${2:be_${3:predicate}} ${4}
   135 snippet shnbp
   135 snippet shnbp
   136 	${1:target}.should_not ${2:be_${3:predicate}} ${4}
   136 	${1:target}.should_not ${2:be_${3:predicate}} ${4}
   137 snippet exre
   137 snippet exre
   138 	expect { ${1} }.to raise_error( ${2:ErrorClass}, /${3:message match}/i )
   138 	expect { ${1} }.to raise_exception( ${2:ErrorClass}, /${3:message match}/i )
   139 	${4}
   139 	${4}
   140 snippet exnre
   140 snippet exnre
   141 	expect { ${1} }.to_not raise_error( ${2:ErrorClass} )
   141 	expect { ${1} }.to_not raise_exception( ${2:ErrorClass} )
   142 	${3}
   142 	${3}
   143 snippet shre
   143 snippet shre
   144 	lambda { ${1} }.should raise_error( ${2:ErrorClass}, /${3:message match}/i )
   144 	lambda { ${1} }.should raise_exception( ${2:ErrorClass}, /${3:message match}/i )
   145 	${4}
   145 	${4}
   146 snippet shnre
   146 snippet shnre
   147 	lambda { ${1} }.should_not raise_error( ${2:ErrorClass} )
   147 	lambda { ${1} }.should_not raise_exception( ${2:ErrorClass} )
   148 	${3}
   148 	${3}
   149 snippet shr
   149 snippet shr
   150 	${1:mock}.should_receive( :${2:message} )${3}
   150 	${1:mock}.should_receive( :${2:message} )${3}
   151 snippet shnr
   151 snippet shnr
   152 	${1:mock}.should_not_receive( :${2:message} )${3}
   152 	${1:mock}.should_not_receive( :${2:message} )${3}