We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2c5356 commit c59d105Copy full SHA for c59d105
2 files changed
spec/fixtures/settings.yml
@@ -12,6 +12,7 @@ databases:
12
# ...
13
#
14
size: 1
15
+number_in_quotes: "2.56"
16
server: google.com
17
1: "one"
18
photo_sizes:
spec/options_spec.rb
@@ -239,4 +239,18 @@
239
expect(options.as_json).to eq({ 'foo' => 'bar' })
240
end
241
242
+
243
+ context 'parsing values' do
244
+ let(:config) do
245
+ Config.load_files("#{fixture_path}/settings.yml")
246
+ end
247
248
+ it 'should return number when its specified without quotes' do
249
+ expect(config['size']).to eq(1)
250
251
252
+ it 'should return string when number specified with quotes' do
253
+ expect(config['number_in_quotes']).to eq("2.56")
254
255
256
0 commit comments