Sha256: 516687658781e568cf3acc1d3e156e010b83d790f5781cb7a1c31e96602d6cce

Contents?: true

Size: 569 Bytes

Versions: 3

Compression:

Stored size: 569 Bytes

Contents

module Danconia
  module Stores
    describe InMemory do
      context 'rates' do
        it 'filters rates by type' do
          subject.save_rates [
            {pair: 'USDARS', rate: 3, rate_type: 'divisas'},
            {pair: 'USDARS', rate: 4, rate_type: 'billetes'}
          ]

          expect(subject.rates(rate_type: 'divisas')).to match [include(rate: 3)]
          expect(subject.rates(rate_type: 'billetes')).to match [include(rate: 4)]
          expect(subject.rates).to match [include(rate: 3), include(rate: 4)]
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
danconia-0.4.0 spec/danconia/stores/in_memory_spec.rb
danconia-0.3.1 spec/danconia/stores/in_memory_spec.rb
danconia-0.3.0 spec/danconia/stores/in_memory_spec.rb