Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add new Matcher DSL snippet

  • Loading branch information...
commit b6f62fb426005a5e0e6368076e330f27d93ad288 1 parent 874cd73
David Chelimsky authored March 31, 2009
10  Snippets/Custom Matcher.tmSnippet → Snippets/Matcher (Custom).tmSnippet
... ...
@@ -1,5 +1,5 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2  
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3 3
 <plist version="1.0">
4 4
 <dict>
5 5
 	<key>content</key>
@@ -15,11 +15,11 @@
15 15
     true
16 16
   end
17 17
 
18  
-  def failure_message
  18
+  def failure_message_for_should
19 19
     "expected #{@actual.inspect} to $2 #{@$3.inspect}, but it didn't"
20 20
   end
21 21
 
22  
-  def negative_failure_message
  22
+  def failure_message_for_should_not
23 23
     "expected #{@actual.inspect} not to $2 #{@$3.inspect}, but it did"
24 24
   end
25 25
 end
@@ -28,11 +28,11 @@ def ${2:reverse_to}(${3:expected})
28 28
   $1.new($3)
29 29
 end</string>
30 30
 	<key>name</key>
31  
-	<string>Custom Matcher</string>
  31
+	<string>Matcher (Custom)</string>
32 32
 	<key>scope</key>
33 33
 	<string>source.ruby.rspec</string>
34 34
 	<key>tabTrigger</key>
35  
-	<string>mat</string>
  35
+	<string>matc</string>
36 36
 	<key>uuid</key>
37 37
 	<string>55BF6C99-B4C4-4772-B7DC-0A18407E429C</string>
38 38
 </dict>
21  Snippets/Matcher (DSL).tmSnippet
... ...
@@ -0,0 +1,21 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3
+<plist version="1.0">
  4
+<dict>
  5
+	<key>content</key>
  6
+	<string>Spec::Matchers.create ${1::look_like} do |meringue|
  7
+  match do |substance|
  8
+    substance.looks_like?(meringue)
  9
+  end
  10
+end
  11
+</string>
  12
+	<key>name</key>
  13
+	<string>Matcher (DSL)</string>
  14
+	<key>scope</key>
  15
+	<string>source.ruby.rspec</string>
  16
+	<key>tabTrigger</key>
  17
+	<string>mat</string>
  18
+	<key>uuid</key>
  19
+	<string>15CE9873-2B79-44C5-8B20-2DA3BBF97E9E</string>
  20
+</dict>
  21
+</plist>
3  info.plist
@@ -218,6 +218,7 @@
218 218
 		<string>ED8BDE00-5FD7-4E47-84FD-4B971557FD73</string>
219 219
 		<string>7D960FC5-4859-4328-A06B-73A3CF6763E0</string>
220 220
 		<string>1201777F-3AC4-4B2A-9A46-C215F891B07A</string>
  221
+		<string>15CE9873-2B79-44C5-8B20-2DA3BBF97E9E</string>
221 222
 		<string>55BF6C99-B4C4-4772-B7DC-0A18407E429C</string>
222 223
 		<string>520CA137-E4FC-4DB0-92DA-980DFE54A35B</string>
223 224
 		<string>AF99B458-D589-414D-87C7-8FACD2EF9FD5</string>
@@ -276,8 +277,6 @@
276 277
 		<string>E79DAF3F-8960-47C1-A34C-3D0E4B0AF926</string>
277 278
 		<string>96F0A193-32F1-4A75-9093-5D20E36593EC</string>
278 279
 		<string>647C94D6-42FE-40F0-8618-73F7725BF59E</string>
279  
-		<string>73A67D49-CA5B-4B8A-9B62-003506276CDD</string>
280  
-		<string>FCB3248F-0AFD-4CB5-BF4F-1B7CDB807981</string>
281 280
 		<string>AC7FD3DD-A904-4B5B-8B02-4D6F04CD8ED4</string>
282 281
 		<string>240FDD9D-CD49-4917-9003-80A3E1DADFBA</string>
283 282
 		<string>B5906021-8E54-4863-A13B-EA46333DB5F1</string>

0 notes on commit b6f62fb

Please sign in to comment.
Something went wrong with that request. Please try again.