Skip to content

Instantly share code, notes, and snippets.

@olgen
Created September 20, 2012 15:49
Show Gist options
  • Save olgen/3756726 to your computer and use it in GitHub Desktop.
Save olgen/3756726 to your computer and use it in GitHub Desktop.
what to spec
it 'converts a bid_request and looks for ad' do
context = mock(Ed::AdContext, :site => mock(Site, :ad_provider_configurations => nil), :ad_chooser_options => nil)
@handler.should_receive(:create_ad_context).and_return(context)
Ed::AdProvider.should_receive(:default_provider_response).with(context)
@handler.get_ad
end
def get_ad
@ad_context = create_ad_context(true)
@ad = Ed::AdProvider.getAd(@ad_context)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment