Sha256: 19c03441cf4cc0e2bb8669768c003a6cd80fd946a364903bc0ce9d29bfa3b61e
Contents?: true
Size: 478 Bytes
Versions: 40
Compression:
Stored size: 478 Bytes
Contents
# frozen_string_literal: true describe Spotlight::Filter do context 'with a simple string field' do subject { described_class.new(field: 'x', value: 'y') } it 'passes the value through' do expect(subject.to_hash).to eq 'x' => 'y' end end context 'with a boolean field' do subject { described_class.new(field: 'x_bsi', value: 'true') } it 'casts the value to a boolean' do expect(subject.to_hash).to eq 'x_bsi' => true end end end
Version data entries
40 entries across 40 versions & 1 rubygems