diff --git a/Snippets/Custom Matcher.tmSnippet b/Snippets/Custom Matcher.tmSnippet new file mode 100644 index 0000000..939978a --- /dev/null +++ b/Snippets/Custom Matcher.tmSnippet @@ -0,0 +1,31 @@ + + + + + content + defmodule ${1:MyCustomMatcher} + defp match(${3:subject}, ${4:number}) do + result = rem(${4:number}, ${3:subject}) + {result == 0, result} + end + + defp success_message(${3:subject}, ${4:number}, ${5:_result}, ${6:positive}) do + to = if ${6:positive}, do: "is", else: "is not" + "`#{inspect ${3:subject}}` #{to} the divisor of #{${4:number}}." + end + + defp error_message(${3:subject}, ${4:number}, ${5:result}, ${6:positive}) do + to = if ${6:positive}, do: "to", else: "not to" + "Expected `#{inspect ${3:subject}}` #{to} be the divisor of `#{${4:number}}`, but the remainder is '#{${5:result}}'." + end +end + name + Custom Matcher + scope + source.elixir.espec + tabTrigger + cusmat + uuid + 55BF6C99-B4C4-4772-B7DC-0A18407E429C + + diff --git a/Snippets/context-sync-async.tmSnippet b/Snippets/context-sync-async.tmSnippet new file mode 100644 index 0000000..c1b47cf --- /dev/null +++ b/Snippets/context-sync-async.tmSnippet @@ -0,0 +1,19 @@ + + + + + content + context "${1:description}", sync: ${2:sync_mode} do + ${3:matcher} +end$0 + + name + context sync + scope + source.elixir.espec + tabTrigger + consy + uuid + 1201777F-3AC4-4B2A-9A46-C215F891B07A + + \ No newline at end of file diff --git a/Snippets/finally-block.tmSnippet b/Snippets/finally-block.tmSnippet new file mode 100644 index 0000000..48906b0 --- /dev/null +++ b/Snippets/finally-block.tmSnippet @@ -0,0 +1,19 @@ + + + + + content + finally do + ${1:block} +end + + name + finally + scope + source.elixir.espec + tabTrigger + fnlb + uuid + 1201777F-3AC4-4B2A-9A46-C215F891B07A + + diff --git a/Snippets/finally-one-line.tmSnippet b/Snippets/finally-one-line.tmSnippet new file mode 100644 index 0000000..c7b334e --- /dev/null +++ b/Snippets/finally-one-line.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + finally do: ${1:block} do + name + finally + scope + source.elixir.espec + tabTrigger + fnl + uuid + 1201777F-3AC4-4B2A-9A46-C215F891B07A + + diff --git a/Snippets/include_examples.tmSnippet b/Snippets/include_examples.tmSnippet new file mode 100644 index 0000000..aaa4ddb --- /dev/null +++ b/Snippets/include_examples.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + include_examples(${1:SharedExample}) + name + include shared examples + scope + source.elixir.espec + tabTrigger + incse + uuid + 1201777F-3AC4-4B2A-9A46-C215F891B07A + + diff --git a/Snippets/setup-one-line.tmSnippet b/Snippets/setup-one-line.tmSnippet new file mode 100644 index 0000000..cebe248 --- /dev/null +++ b/Snippets/setup-one-line.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + before do: $0 + name + before + scope + source.elixir.espec + tabTrigger + bef + uuid + 7D960FC5-4859-4328-A06B-73A3CF6763E0 + + diff --git a/Snippets/setup.tmSnippet b/Snippets/setup.tmSnippet new file mode 100644 index 0000000..d34a563 --- /dev/null +++ b/Snippets/setup.tmSnippet @@ -0,0 +1,18 @@ + + + + + content + before do + $0 +end + name + before + scope + source.elixir.espec + tabTrigger + befb + uuid + 7D960FC5-4859-4328-A06B-73A3CF6763E0 + + diff --git a/Snippets/to_raise.tmSnippet b/Snippets/to_raise.tmSnippet new file mode 100644 index 0000000..e8b75d7 --- /dev/null +++ b/Snippets/to_raise.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + to_raise(${1:exception}) + name + to_raise + scope + source.elixir.espec + tabTrigger + tre + uuid + 65B85B0D-26FC-4A08-8D6A-7BF00AA787FC + + diff --git a/Snippets/to_throw.tmSnippet b/Snippets/to_throw.tmSnippet new file mode 100644 index 0000000..f77c776 --- /dev/null +++ b/Snippets/to_throw.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + to(${:throw_term}) + name + to(throw_term) + scope + source.elixir.espec + tabTrigger + tth + uuid + 2CC293EE-496A-4B66-928C-332DDCBEE884 + + diff --git a/Snippets/to_throw_term.tmSnippet b/Snippets/to_throw_term.tmSnippet new file mode 100644 index 0000000..687dbad --- /dev/null +++ b/Snippets/to_throw_term.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + to(${:throw_term} ${2:term}) + name + to(throw_term term) + scope + source.elixir.espec + tabTrigger + tth + uuid + 2CC293EE-496A-4B66-928C-332DDCBEE884 + + diff --git a/Snippets/use-ESpec.Phoenix.Controller.tmSnippet b/Snippets/use-ESpec.Phoenix.Controller.tmSnippet new file mode 100644 index 0000000..3ede084 --- /dev/null +++ b/Snippets/use-ESpec.Phoenix.Controller.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + use ESpec.Phoenix, controller: Pspgwe.MyController + name + use ESpec.Phoenix.Controller + scope + source.elixir.espec + tabTrigger + usesphc + uuid + DAD2B74D-2105-42B0-9FC5-466F3B3D0DB7 + + diff --git a/Snippets/use-ESpec.Phoenix.Model.tmSnippet b/Snippets/use-ESpec.Phoenix.Model.tmSnippet new file mode 100644 index 0000000..c273196 --- /dev/null +++ b/Snippets/use-ESpec.Phoenix.Model.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + use ESpec.Phoenix, model: MyModel + name + use ESpec.Phoenix + scope + source.elixir.espec + tabTrigger + usesphm + uuid + DAD2B74D-2105-42B0-9FC5-466F3B3D0DB7 + + diff --git a/Snippets/use-ESpec.Phoenix.Request.xml b/Snippets/use-ESpec.Phoenix.Request.xml new file mode 100644 index 0000000..45bb0ba --- /dev/null +++ b/Snippets/use-ESpec.Phoenix.Request.xml @@ -0,0 +1,16 @@ + + + + + content + use ESpec.Phoenix, request: Pspgwe.Endpoint + name + use ESpec.Phoenix.Endpoint + scope + source.elixir.espec + tabTrigger + usesphr + uuid + DAD2B74D-2105-42B0-9FC5-466F3B3D0DB7 + + diff --git a/Snippets/use-ESpec.Phoenix.View.tmSnippet b/Snippets/use-ESpec.Phoenix.View.tmSnippet new file mode 100644 index 0000000..815baac --- /dev/null +++ b/Snippets/use-ESpec.Phoenix.View.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + use ESpec.Phoenix, view: Pspgwe.ExamplesView + name + use ESpec.Phoenix.ExamplesView + scope + source.elixir.espec + tabTrigger + usesphv + uuid + DAD2B74D-2105-42B0-9FC5-466F3B3D0DB7 + + diff --git a/Snippets/use-ESpec.tmSnippet b/Snippets/use-ESpec.tmSnippet new file mode 100644 index 0000000..5e1956f --- /dev/null +++ b/Snippets/use-ESpec.tmSnippet @@ -0,0 +1,16 @@ + + + + + content + use ESpec + name + use ESpec + scope + source.elixir.espec + tabTrigger + usesp + uuid + DAD2B74D-2105-42B0-9FC5-466F3B3D0DB7 + +