From c0134050223647dedb4308df4236d1574917467d Mon Sep 17 00:00:00 2001 From: leandrost Date: Tue, 5 Nov 2013 19:32:12 -0200 Subject: [PATCH 1/7] javascript test snippets --- snippets/javascript-test.snippets | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 snippets/javascript-test.snippets diff --git a/snippets/javascript-test.snippets b/snippets/javascript-test.snippets new file mode 100644 index 000000000..d2c551e91 --- /dev/null +++ b/snippets/javascript-test.snippets @@ -0,0 +1,8 @@ +snippet it + it("${1}", function () { + ${2} + }); +snippet cont + context("${1}", function () { + ${2} + }); From f6d2a6f2f92afc8c0778b257bb6b92867e8f1cca Mon Sep 17 00:00:00 2001 From: leandrost Date: Fri, 29 Nov 2013 19:06:41 -0200 Subject: [PATCH 2/7] adicionando snippets pra describe befores afters --- snippets/javascript-test.snippets | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/snippets/javascript-test.snippets b/snippets/javascript-test.snippets index d2c551e91..4b2a71b4f 100644 --- a/snippets/javascript-test.snippets +++ b/snippets/javascript-test.snippets @@ -1,8 +1,35 @@ +snippet desc + describe("${1}", function () { + ${2} + }); + snippet it it("${1}", function () { ${2} }); + snippet cont context("${1}", function () { ${2} }); + +snippet bef + before("${1}", function () { + ${2} + }); + +snippet befe + beforeEach("${1}", function () { + ${2} + }); + +snippet aft + after("${1}", function () { + ${2} + }); + +snippet afte + afterEach("${1}", function () { + ${2} + }); + From 52c6ef39406dc6813f737034b46d563d124ed155 Mon Sep 17 00:00:00 2001 From: leandrost Date: Mon, 6 Jan 2014 12:18:10 -0200 Subject: [PATCH 3/7] corrigindo before's e after's --- snippets/javascript-test.snippets | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/snippets/javascript-test.snippets b/snippets/javascript-test.snippets index 4b2a71b4f..5d65be607 100644 --- a/snippets/javascript-test.snippets +++ b/snippets/javascript-test.snippets @@ -14,22 +14,22 @@ snippet cont }); snippet bef - before("${1}", function () { - ${2} + before(function () { + ${1} }); snippet befe - beforeEach("${1}", function () { - ${2} + beforeEach(function () { + ${1} }); snippet aft - after("${1}", function () { - ${2} + after(function () { + ${1} }); snippet afte - afterEach("${1}", function () { - ${2} + afterEach(function () { + ${1} }); From 67bd319bfe230747217d5bcabc3cddaf8a8e060a Mon Sep 17 00:00:00 2001 From: leandrost Date: Mon, 6 Jan 2014 12:18:10 -0200 Subject: [PATCH 4/7] fix before's and after's snippets --- snippets/javascript-test.snippets | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/snippets/javascript-test.snippets b/snippets/javascript-test.snippets index 4b2a71b4f..5d65be607 100644 --- a/snippets/javascript-test.snippets +++ b/snippets/javascript-test.snippets @@ -14,22 +14,22 @@ snippet cont }); snippet bef - before("${1}", function () { - ${2} + before(function () { + ${1} }); snippet befe - beforeEach("${1}", function () { - ${2} + beforeEach(function () { + ${1} }); snippet aft - after("${1}", function () { - ${2} + after(function () { + ${1} }); snippet afte - afterEach("${1}", function () { - ${2} + afterEach(function () { + ${1} }); From f45e6abe1b1e2a014e4154a4affa7477b6613c26 Mon Sep 17 00:00:00 2001 From: leandrost Date: Fri, 23 May 2014 10:43:32 -0300 Subject: [PATCH 5/7] change (it, context, describe) snippets double quotes to single quotes --- snippets/ruby.snippets | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/snippets/ruby.snippets b/snippets/ruby.snippets index 5d9c01ea3..7989b95f8 100644 --- a/snippets/ruby.snippets +++ b/snippets/ruby.snippets @@ -1014,11 +1014,11 @@ snippet desc ${0} end snippet descm - describe "${1:#method}" do - ${0:pending "Not implemented"} + describe '${1:#method}' do + ${0:pending 'Not implemented'} end snippet cont - context "${1:message}" do + context '${1:message}' do ${0} end snippet bef @@ -1050,7 +1050,7 @@ snippet shared snippet ibl it_behaves_like ${0:"shared examples name"} snippet it - it "${1:spec_name}" do + it '${1:spec_name}' do ${0} end snippet its From d8b7154698b7b1a1e0fce52e5deab2a283406d4d Mon Sep 17 00:00:00 2001 From: leandrost Date: Thu, 3 Jul 2014 14:11:59 -0300 Subject: [PATCH 6/7] revert change (it, context, describe) snippets double quotes to single quotes --- snippets/ruby.snippets | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/snippets/ruby.snippets b/snippets/ruby.snippets index 7989b95f8..593009158 100644 --- a/snippets/ruby.snippets +++ b/snippets/ruby.snippets @@ -756,7 +756,7 @@ snippet mapwo # model callback snippets # ############################### -# before callback +# callback snippet mbv before_validation :${0:method} snippet mbc @@ -1014,11 +1014,11 @@ snippet desc ${0} end snippet descm - describe '${1:#method}' do - ${0:pending 'Not implemented'} + describe "${1:#method}" do + ${0:pending "Not implemented"} end snippet cont - context '${1:message}' do + context "${1:message}" do ${0} end snippet bef @@ -1050,7 +1050,7 @@ snippet shared snippet ibl it_behaves_like ${0:"shared examples name"} snippet it - it '${1:spec_name}' do + it "${1:spec_name}" do ${0} end snippet its From 1432cc74075af25bd04a2c513b63bb3e43a9aa44 Mon Sep 17 00:00:00 2001 From: leandrost Date: Mon, 6 Jul 2015 12:52:08 -0300 Subject: [PATCH 7/7] Add some snippets to tests using js --- snippets/javascript-test.snippets | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/snippets/javascript-test.snippets b/snippets/javascript-test.snippets index 5d65be607..fab3cd356 100644 --- a/snippets/javascript-test.snippets +++ b/snippets/javascript-test.snippets @@ -33,3 +33,12 @@ snippet afte ${1} }); +snippet exp + expect(${1}).to${2}; + +snippet expe + expect(${1}).to.equal(${2}); + +snippet eql + equal(${1}); +