Skip to content

Commit

Permalink
Added many ESpec snippets and sublime related files
Browse files Browse the repository at this point in the history
  • Loading branch information
retgoat committed Jan 29, 2016
1 parent a89d1ed commit d34c39b
Show file tree
Hide file tree
Showing 88 changed files with 545 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
*.cache
15 changes: 15 additions & 0 deletions Default (OSX).sublime-keymap
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
{
"keys": ["super+alt+b"],
"command": "exec",
"args": {"cmd": ["mix", "espec", "*"]},
"file_regex": "# ([A-Za-z0-9_./ ]+exs):([0-9]+)",
"working_dir": "${folder}"
},

{
"keys": ["super+period+e"],
"command": "open_rspec_file",
"args": {}
}
]
10 changes: 10 additions & 0 deletions Default.sublime-commands
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
{
"caption": "ESpec: open corresponding file",
"command": "open_espec_file"
},
{
"caption": "ESpec: create new module",
"command": "espec_create_module"
}
]
6 changes: 6 additions & 0 deletions ESpec - Mix.sublime-build
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"shell_cmd": "cd $folder && mix espec",
"file_regex": "# ([A-Za-z:0-9_./ ]+exs):([0-9]+)",
"working_dir": "$file_path",
"selector": "source.elixir.espec"
}
6 changes: 6 additions & 0 deletions Snippets/allow-to-accept-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[allow ${1:module} |> to(accept(:${2:func}, fn(${3:args}) -> ${4:result} end)$0]]></content>
<tabTrigger>allaccn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>allow Module |> to(accept(func, fn(args) -> result end)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/allow-to-accept.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[allow(${1:Module}).to accept(:${2:func}, fn(${3:args}) -> ${4:result} end)$0]]></content>
<tabTrigger>allacc</tabTrigger>
<scope>source.elixir.espec</scope>
<description>allow(Module).to accept(func, fn(args) -> result end)</description>
</snippet>
8 changes: 8 additions & 0 deletions Snippets/context.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[context "${1:description}" do
$0
end]]></content>
<tabTrigger>con</tabTrigger>
<scope>source.elixir.espec</scope>
<description>context "description" do … end</description>
</snippet>
8 changes: 8 additions & 0 deletions Snippets/describe-block.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[describe "${1:description}" do
$0
end]]></content>
<tabTrigger>des</tabTrigger>
<scope>source.elixir.espec</scope>
<description>describe "description" do … end</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/example.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[example do: expect ${1:exp} |> to ${2:matcher}]]></content>
<tabTrigger>exa</tabTrigger>
<scope>source.elixir.espec</scope>
<description>example do: exp |> to matcher</description>
</snippet>
8 changes: 8 additions & 0 deletions Snippets/example_group.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<snippet>
<content><![CDATA[example_group "${1:description}" do
$0
end]]></content>
<tabTrigger>exg</tabTrigger>
<scope>source.elixir.espec</scope>
<description>example_group "description" do … end</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-one-line-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:expression} |> to ${2:matcher}]]></content>
<tabTrigger>expn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect expression |> to something</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-one-line.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:smth}).to ${2:matcher}$0]]></content>
<tabTrigger>exp</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(smth).to something</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-atom.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:smth} |> to(be_atom)$0]]></content>
<tabTrigger>expbatm</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect smth |> to(be_atom)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-between-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:subject} |> to(be_between ${2:result}, ${3:tolerance})$0]]></content>
<tabTrigger>expbbn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(be_between(expected, delta)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-between.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:subject}).to be_between(${2:result}, ${3:tolerance})$0]]></content>
<tabTrigger>expbb</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(obj).to be_between(expected, delta)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-binary.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:smth} |> to(be_binary)$0]]></content>
<tabTrigger>expbbn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect smth |> to(be_binary)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-bitsting.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:smth} |> to(be_bitstring)$0]]></content>
<tabTrigger>expbits</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect smth |> to(be_bitstring)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-close-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to(be_close_to ${2:result}, ${3:tolerance})$0]]></content>
<tabTrigger>expbcn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(be_close_to(expected, delta)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-close.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:smth}).to be_close_to(${2:result}, ${3:tolerance})$0]]></content>
<tabTrigger>expbc</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(smth).to be_close_to(expected, delta)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-false.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to(be_false)$0]]></content>
<tabTrigger>expbf</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(be_false)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-falsy.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to(be_falsy)$0]]></content>
<tabTrigger>expbfy</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(be_falsy)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-function-arity.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to(be_function, ${2:arity})$0]]></content>
<tabTrigger>expbfunca</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(be_function, aruty)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-function.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to(be_function)$0]]></content>
<tabTrigger>expbfunc</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(be_function)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-list.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:smth} |> to(be_list)$0]]></content>
<tabTrigger>expbli</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect smth |> to(be_list)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to(be ${2:operator}, ${2:value})$0]]></content>
<tabTrigger>expben</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(be operator, value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-printable-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:String} |> to(be_printable)$0]]></content>
<tabTrigger>expbprnn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect String |> to(be_printable)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-printable.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:String}).to be_printable$0]]></content>
<tabTrigger>expbprn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(String).to be_printable</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-struct-Struct.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:smth} |> to(be_struct, ${2:StructExample})$0]]></content>
<tabTrigger>expbstrus</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect smth |> to(be_struct, StructExample)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-struct.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:smth} |> to(be_struct)$0]]></content>
<tabTrigger>expbstru</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect smth |> to(be_struct)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-true.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to(be_true)$0]]></content>
<tabTrigger>expbt</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(be_true)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-truthy.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to(be_truthy)$0]]></content>
<tabTrigger>expbth</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(be_truthy)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-tuple.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:smth} |> to(be_tuple)$0]]></content>
<tabTrigger>expbtpl</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect smth |> to(be_tuple)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-valid-string-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:String} |> to(be_valid_string)$0]]></content>
<tabTrigger>expbvsn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect String |> to(be_valid_string)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be-valid-string.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:String}).to be_valid_string$0]]></content>
<tabTrigger>expbvs</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(String).to be_valid_string</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-be.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:smth}).to be(${2:operator}, ${2:value})$0]]></content>
<tabTrigger>expbe</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(smth).to be(operator, value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-change-from-to.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func1} |> to(change ${2:func2}, ${3:value_from}, ${3:value_to})$0]]></content>
<tabTrigger>expchngft</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func1 |> to(change func2, value_from, value_to)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-change.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func1} |> to(change ${2:func2}, ${3:value})$0]]></content>
<tabTrigger>expchng</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func1 |> to(change func2, value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-end-with-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:smth} |> to(end_with ${2:value})$0]]></content>
<tabTrigger>expendn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect smth |> to(end_with value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-end-with.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:smth}).to end_with(${2:value})$0]]></content>
<tabTrigger>expend</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(smth).to end_with(value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-eq-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to(eq ${2:value})$0]]></content>
<tabTrigger>expeqn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(eq value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-eq.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:smth}).to eq(${2:value})$0]]></content>
<tabTrigger>expeq</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(smth).to eq(value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-eql-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:func} |> to (eql ${2:value})$0]]></content>
<tabTrigger>expeqln</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect func |> to(eql value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-eql.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:func}).to eql(${2:value})$0]]></content>
<tabTrigger>expeql</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(func).to eql(value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-all-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:Module} |> to(have_all fn(${2:x}) -> end)$0]]></content>
<tabTrigger>exphavan</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect Module |> to(have_all fn(x) -> x end)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-at-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:Module} |> to(have_at ${2:position}, ${3:value})$0]]></content>
<tabTrigger>exphatn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect Module |> to(have_at position, value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-at.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:Module}).to have_at(${2:position}, ${3:value})$0]]></content>
<tabTrigger>exphat</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(Module).to have_at(position, value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-count-by-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:Module} |> to(have_count_by ${2:func}, ${3:value})$0]]></content>
<tabTrigger>exphcntbyn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect Module |> to(have_count_by func, value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-count-by.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:Module}).to have_count_by(${2:func}, ${3:value})$0]]></content>
<tabTrigger>exphcntby</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(Module).to have_count_by(func, value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-count-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:Module} |> to(have_count ${2:value})$0]]></content>
<tabTrigger>exphacon</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect Module |> to(have_count value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-count.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:Module}).to have_count(${2:value})$0]]></content>
<tabTrigger>exphaco</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(Module).to have_count(value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-last-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:Module} |> to(have_last ${2:value})$0]]></content>
<tabTrigger>exphalastn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect Module |> to(have_last value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-last.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:Module}).to have_last(${2:value})$0]]></content>
<tabTrigger>exphalast</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(Module).to have_last(value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-length.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect(${1:Module}).to have_length(${2:value})$0]]></content>
<tabTrigger>exphal</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect(Module).to have_length(value)</description>
</snippet>
6 changes: 6 additions & 0 deletions Snippets/expect-to-have-max-by-new.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<snippet>
<content><![CDATA[expect ${1:Module} |> to(have_max_by ${2:func}, ${3:value})$0]]></content>
<tabTrigger>exphmaxbyn</tabTrigger>
<scope>source.elixir.espec</scope>
<description>expect Module |> to(have_max_by func, value)</description>
</snippet>
Loading

0 comments on commit d34c39b

Please sign in to comment.