-
Notifications
You must be signed in to change notification settings - Fork 409
Expand file tree
/
Copy pathgo_runner_spec.vim
More file actions
40 lines (34 loc) · 1.01 KB
/
go_runner_spec.vim
File metadata and controls
40 lines (34 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
source spec/support/helpers.vim
describe "Go Runner"
before
cd spec/fixtures
end
after
cd -
end
describe "when test#go#runner is not set"
after
call Teardown()
end
it "should use ginkgo if 'github.com/onsi/ginkgo' is found"
view ginkgo/normal_test.go
TestFile
Expect g:test#last_command =~# '\v^ginkgo'
end
it "should use gotest otherwise"
view gotest/normal_test.go
TestFile
Expect g:test#last_command =~# '\v^go test'
end
end
describe "when test#go#runner is set"
it "should respect test#go#runner"
for runner in ["ginkgo", "gotest", "richgo", "delve"]
let g:test#go#runner = runner
Expect test#determine_runner("ginkgo/normal_test.go") == 'go#'.runner
Expect test#determine_runner("gotest/normal_test.go") == 'go#'.runner
Expect test#determine_runner("richgo/normal_test.go") == 'go#'.runner
Expect test#determine_runner("delve/normal_test.go") == 'go#'.runner
endfor
end
end