spec/support/eventbrite_secrets_support.rb
# Stub successful event_get call to Eventbrite API
Stub successful event_get call to Eventbrite API
Stub successful event_get call to Eventbrite API
def stub_eventbrite_event_get
  mock_event = { name: { text: 'test' }, ticket_classes: [ { id: '1234', name: 'test', free: true, hidden: true }]}
  response = double('Yay!', to_hash: {"Status" => ["200 OK"]}, code: 200)
  res = RestClient::Response.create(mock_event.to_json, response, {}, {})
  expect(RestClient).to receive(:get).and_return(res)
end
def stub_eventbrite_event_get mock_event = { name : { text : 'test' } , ticket_classes : [ { id : '1234' , name : 'test' , free : true , hidden : true } ] } response = double ( 'Yay!' , to_hash : { "Status" => [ "200 OK" ] } , code : 200 ) res = RestClient :: Response . create ( mock_event . to_json , response , { } , { } ) expect ( RestClient ) . to receive ( :get ) . and_return ( res ) end
Stub successful event_get call to Eventbrite API
Stub successful event_get call to Eventbrite API