Skip to content

Commit

Permalink
Merge branch 'us-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
noniq committed Oct 23, 2014
2 parents a4582bf + 8a684c0 commit 7376ea2
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 9 deletions.
19 changes: 19 additions & 0 deletions Snippets/background.tmSnippet
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>background${1|,(:each),(:all),(:suite)|} do
$0
end
</string>
<key>name</key>
<string>background</string>
<key>scope</key>
<string>source.ruby.rspec</string>
<key>tabTrigger</key>
<string>back</string>
<key>uuid</key>
<string>64EE7CF8-0C53-434F-B8CF-92DC97696C7B</string>
</dict>
</plist>
16 changes: 16 additions & 0 deletions Snippets/given!.tmSnippet
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>given!(:${1:instance}) { $0 }</string>
<key>name</key>
<string>given!</string>
<key>scope</key>
<string>source.ruby.rspec</string>
<key>tabTrigger</key>
<string>given!</string>
<key>uuid</key>
<string>79EE2815-30C8-4901-B02D-2C4EFF45BE9E</string>
</dict>
</plist>
16 changes: 16 additions & 0 deletions Snippets/given.tmSnippet
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>given(:${1:instance}) { $0 }</string>
<key>name</key>
<string>given</string>
<key>scope</key>
<string>source.ruby.rspec</string>
<key>tabTrigger</key>
<string>given</string>
<key>uuid</key>
<string>065A26CD-E64A-4771-9F85-7E0F29FAE1D9</string>
</dict>
</plist>
16 changes: 16 additions & 0 deletions Snippets/let!.tmSnippet
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>let!(:${1:instance}) { $0 }</string>
<key>name</key>
<string>let!</string>
<key>scope</key>
<string>source.ruby.rspec</string>
<key>tabTrigger</key>
<string>let!</string>
<key>uuid</key>
<string>4AA40F8B-6382-4B5D-965E-12AD6C4DFC52</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion Snippets/setup.tmSnippet
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>before${1:(${2:each})} do
<string>before${1|,(:each),(:all),(:suite)|} do
$0
end</string>
<key>name</key>
Expand Down
2 changes: 1 addition & 1 deletion Snippets/teardown.tmSnippet
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>after${1:(${2:each})} do
<string>after${1|,(:each),(:all),(:suite)|} do
$0
end</string>
<key>name</key>
Expand Down
14 changes: 7 additions & 7 deletions Syntaxes/RSpec.tmLanguage
Expand Up @@ -52,7 +52,7 @@
<array>
<dict>
<key>match</key>
<string>(?&lt;!\.)\b(before|after|around)\b(?![?!])</string>
<string>(?&lt;!\.)\b(before|after|around|background)\b(?![?!])</string>
<key>name</key>
<string>keyword.other.rspec</string>
</dict>
Expand Down Expand Up @@ -90,7 +90,7 @@
<key>behaviour</key>
<dict>
<key>begin</key>
<string>^\s*(describe|context|feature)\b(?=.*\bdo\s*$)</string>
<string>^\s*([fx]?(?:describe|context|feature))\b(?=.*\bdo\s*$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
Expand Down Expand Up @@ -134,14 +134,14 @@
<key>comment</key>
<string>Behaviours with multiline descriptions are not matched by `behaviour`, so as a fallback we just highlight the bare keywords</string>
<key>match</key>
<string>^\s*(describe|context|feature)\b</string>
<string>^\s*([fx]?(?:describe|context|feature))\b</string>
<key>name</key>
<string>meta.rspec.behaviour</string>
</dict>
<key>example</key>
<dict>
<key>begin</key>
<string>^\s*(it|specify|scenario)\b(?=.*\bdo\s*$)</string>
<string>^\s*([fx]?(?:it|specify|scenario))\b(?=.*\bdo\s*$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
Expand Down Expand Up @@ -185,7 +185,7 @@
<key>comment</key>
<string>Examples with multiline descriptions are not matched by `behaviour`, so as a fallback we just highlight the bare keywords</string>
<key>match</key>
<string>^\s*(it|specify|scenario)\b</string>
<string>^\s*([fx]?(?:it|specify|scenario))\b</string>
<key>name</key>
<string>meta.rspec.example</string>
</dict>
Expand All @@ -207,7 +207,7 @@
<key>comment</key>
<string>This only works with simple single / double quoted strings. But matching too liberally causes bugs (see https://github.com/rspec/rspec-tmbundle/issues/45), so better err on the safe side.</string>
<key>match</key>
<string>^\s*(it|specify|scenario|describe|context|feature)\s+("[^"]*"|'[^']*')(?&lt;!do)\s*$</string>
<string>^\s*([fx]?(?:it|specify|scenario|describe|context|feature))\s+("[^"]*"|'[^']*')(?&lt;!do)\s*$</string>
<key>name</key>
<string>meta.rspec.pending</string>
</dict>
Expand All @@ -222,7 +222,7 @@
</dict>
</dict>
<key>match</key>
<string>^\s*(it|specify|scenario)\s*{</string>
<string>^\s*([fx]?(?:it|specify|scenario))\s*{</string>
</dict>
</dict>
<key>scopeName</key>
Expand Down

0 comments on commit 7376ea2

Please sign in to comment.