Sha256: dfc4476de32587ca703120c2abe3f1cc896d42e24204fd16abf10565ceda45d8
Contents?: true
Size: 660 Bytes
Versions: 14
Compression:
Stored size: 660 Bytes
Contents
require 'spec_helper' module Qbrick describe Setting, type: :model do before do create(:setting) create(:setting, key: 'stuff', value: nil) end describe '[](key)' do context 'setting exists' do it 'returns the set value' do expect(Setting[:code]).to eq('SomeValue') end it 'returns empty string for empty setting' do expect(Setting[:stuff]).to eq('') end end context "setting doesn't exist" do it 'returns empty string for a call on a non-present setting' do expect(Setting[:does_not_exist]).to eq('') end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems