Sha256: 499c735c2654276afac6fb4f6243f140c81849f163371978e42b536268b76399

Contents?: true

Size: 650 Bytes

Versions: 29

Compression:

Stored size: 650 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe 'Option Blocks', type: :request do
  let!(:first_request) do
    stub_request(:get, "http://datastore/v2/records?request=first")
      .to_return(status: 200)
  end

  let!(:second_request) do
    stub_request(:get, "http://datastore/v2/records?request=second")
      .to_return(status: 200)
  end

  it 'always ensures option blocks are always reset for new requests',
  dummy_models: true, reset_before: true do
    get '/option_blocks/first'
    expect(first_request).to have_been_made.once
    get '/option_blocks/second'
    expect(second_request).to have_been_made.once
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lhs-26.2.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-26.1.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-26.0.1 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-26.0.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-25.2.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-25.1.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-25.0.4 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-25.0.3 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-25.0.2 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-25.0.1 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-25.0.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-24.1.2 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-24.1.1 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-24.1.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-24.1.0.pre.2 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-24.1.0.pre.1 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-24.0.0 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-23.0.2 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-23.0.1 spec/option_blocks/ensure_reset_between_requests_spec.rb
lhs-23.0.0 spec/option_blocks/ensure_reset_between_requests_spec.rb