Sha256: 41e179bfd90f0a2170d4303b67b72dc4725687c095b43589a771c9ca52246d27

Contents?: true

Size: 422 Bytes

Versions: 36

Compression:

Stored size: 422 Bytes

Contents

require 'spec_helper'

RSpec.describe 'RubyPitaya::RedisService', type: :request do
  it 'mock service' do
    allow(services[:redis]).to receive(:get).with('key').and_return('something')

    value = services[:redis].get('key')

    expect(value).to eq('something')
  end

  it 'not mock service' do
    services[:redis].set('foo', 'bar')

    value = services[:redis].get('foo')

    expect(value).to eq('bar')
  end
end

Version data entries

36 entries across 32 versions & 1 rubygems

Version Path
rubypitaya-3.19.6 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.19.5 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.19.4 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.19.3 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.19.2 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.19.1 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.19.0 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.18.0 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.17.2 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.17.1 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.17.0 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.16.0 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.15.3 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.15.2 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.15.1 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.15.0 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.14.0 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.13.1 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.13.0 ./lib/rubypitaya/app-template/spec/redis_service_spec.rb
rubypitaya-3.12.5 ./lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rubypitaya-3.12.1/lib/rubypitaya/app-template/spec/redis_service_spec.rb