6
6
7
7
require 'neo4j/rake_tasks/starnix_server_manager'
8
8
9
- BASE_PATHNAME = Pathname . new ( File . expand_path ( '../' , __FILE__ ) )
9
+ BASE_PATHNAME = Pathname . new ( File . expand_path ( __dir__ ) )
10
10
11
11
module Neo4j
12
12
module RakeTasks
@@ -19,7 +19,7 @@ module RakeTasks
19
19
subject { server_manager . modify_config_contents ( contents , properties ) }
20
20
after ( :each ) { path . rmtree }
21
21
22
- let_context properties : { prop : 2 } do
22
+ let_context properties : { prop : 2 } do
23
23
let_context ( contents : 'prop=1' ) { it { should eq ( 'prop=2' ) } }
24
24
let_context ( contents : 'prop =1' ) { it { should eq ( 'prop=2' ) } }
25
25
let_context ( contents : 'prop= 1' ) { it { should eq ( 'prop=2' ) } }
@@ -37,11 +37,11 @@ module RakeTasks
37
37
end
38
38
39
39
let_context contents : 'prop=false' do
40
- let_context ( properties : { prop : true } ) { it { should eq ( 'prop=true' ) } }
40
+ let_context ( properties : { prop : true } ) { it { should eq ( 'prop=true' ) } }
41
41
end
42
42
43
43
let_context contents : 'prop=true' do
44
- let_context ( properties : { prop : false } ) { it { should eq ( 'prop=false' ) } }
44
+ let_context ( properties : { prop : false } ) { it { should eq ( 'prop=false' ) } }
45
45
end
46
46
end
47
47
@@ -57,14 +57,14 @@ def server_up(port)
57
57
58
58
before ( :each ) do
59
59
if server_up ( neo4j_port )
60
- fail "There is a server already running on port #{ neo4j_port } . Can't run spec"
60
+ raise "There is a server already running on port #{ neo4j_port } . Can't run spec"
61
61
end
62
62
63
63
if path . exist?
64
64
message = 'DB temporary directory already exists! '
65
65
message += "Delete #{ path } if safe to do so and then proceed"
66
66
67
- fail message
67
+ raise message
68
68
end
69
69
end
70
70
0 commit comments