require 'spec_helper' describe LiveQA::Batch do describe '.create' do let(:response) { double('LiveQA::Request', body: "{\"object\":\"event\",\"id\":41}") } before { allow(LiveQA::Request).to receive(:execute).and_return(response) } subject(:create) { LiveQA::Batch.create(data: []) } it { is_expected.to be_successful } end end