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