Sha256: 96c598af506adb96a056c8aece4bea1216ad1d968c8935f8c5bf09c383e8b6c4

Contents?: true

Size: 570 Bytes

Versions: 1

Compression:

Stored size: 570 Bytes

Contents

require 'spec_helper'

RSpec.describe OptimizelyServerSide::DatafileFetcher do

  describe '#fetch' do

    before do
      stub_request(:get, "https://cdn.optimizely.com/json/5960232316.json")
      .to_return(body: '{"experiments": [{"status": "running"}]}',status: 200)
    end

    it 'should fetch the config' do
      expect(described_class.fetch).to eq('{"experiments": [{"status": "running"}]}')
    end


    it 'should return stringified datafile' do
      expect(described_class.datafile).to eq('{"experiments": [{"status": "running"}]}')
    end

  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
optimizely_server_side-0.0.3 spec/optimizely_server_side/datafile_fetcher_spec.rb