spec/td/client/model_schedule_spec.rb in td-client-0.8.79 vs spec/td/client/model_schedule_spec.rb in td-client-0.8.80
- old
+ new
@@ -12,14 +12,14 @@
}
let(:time) { "2013-01-01 00:00:00" }
let(:num) { 1 }
before do
- API.stub(:new).with(api_key, {}).and_return(api)
+ allow(API).to receive(:new).with(api_key, {}).and_return(api)
end
it 'success call api' do
- api.should_receive(:run_schedule).with(name, time, num).and_return([])
+ expect(api).to receive(:run_schedule).with(name, time, num).and_return([])
schedule.run(time, num)
end
end
end