Skip to content

Commit b80aa27

Browse files
committed
Replace global variables to constants instead
Related to: #233
1 parent ad5277b commit b80aa27

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

spec/spec_helper.rb

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@
2222

2323
SimpleCov.start
2424

25+
# Globals for all tests
26+
URL = 'http://localhost:7700'
27+
MASTER_KEY = 'masterKey'
28+
DEFAULT_SEARCH_RESPONSE_KEYS = [
29+
'hits',
30+
'offset',
31+
'limit',
32+
'nbHits',
33+
'exhaustiveNbHits',
34+
'processingTimeMs',
35+
'query'
36+
].freeze
37+
2538
Dir["#{Dir.pwd}/spec/support/**/*.rb"].sort.each { |file| require file }
2639

2740
RSpec.configure do |config|
@@ -107,20 +120,6 @@
107120
# # as the one that triggered the failure.
108121
# Kernel.srand config.seed
109122

110-
# Globals for all tests
111-
$URL = 'http://localhost:7700'
112-
$MASTER_KEY = 'masterKey'
113-
$DEFAULT_SEARCH_RESPONSE_KEYS =
114-
[
115-
'hits',
116-
'offset',
117-
'limit',
118-
'nbHits',
119-
'exhaustiveNbHits',
120-
'processingTimeMs',
121-
'query'
122-
]
123-
124123
# Helpers
125124
config.include IndexesHelpers
126125
config.include ExceptionsHelpers

0 commit comments

Comments
 (0)