Skip to content

Commit 1eb6be7

Browse files
committed
support yoeman convention
1 parent d885e25 commit 1eb6be7

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

plugin/angular.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ function! s:Alternate(cmd) abort
129129
\ ]
130130
elseif l:currentpath =~ "test/karma/unit"
131131
let l:newpaths = [substitute(substitute(l:currentpath, "test/karma/unit", "public/js", ""), ".spec.js", ".js", "")]
132+
elseif l:currentpath =~ "test/spec"
133+
let l:newpaths = [substitute(l:currentpath, "test/spec", "app/scripts", "")]
134+
elseif l:currentpath =~ "app/scripts"
135+
let l:newpaths = [substitute(l:currentpath, "app/scripts", "test/spec", "")]
132136
elseif l:currentpath =~ "app/src"
133137
let l:newpaths = [substitute(l:currentpath, "app/src", "test/unit", ""), substitute(substitute(l:currentpath, "app/src", "test/unit", ""), ".js", "Spec.js", "")]
134138
elseif l:currentpath =~ "app/js"

spec/alternate_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ def should_alternate_between(file_a, file_b)
2424
should_alternate_between('app/src/poo.js', 'test/unit/pooSpec.js')
2525
should_alternate_between('app/js/poo.js', 'test/unit/poo.js')
2626
should_alternate_between('app/js/poo.js', 'test/unit/pooSpec.js')
27-
should_alternate_between('public/js/controllers/piles.js', 'test/karma/unit/controllers/piles.spec.js')
27+
should_alternate_between('app/scripts/controllers/poo.js', 'test/spec/controllers/poo.js') # yoeman
28+
should_alternate_between('public/js/controllers/piles.js', 'test/karma/unit/controllers/piles.spec.js') # mean
2829
end
2930

3031
specify "pairs should not always work" do

0 commit comments

Comments
 (0)