2013-02-12 07:43:18 -05:00
|
|
|
# encoding: utf-8
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
require 'oneboxer'
|
|
|
|
require 'oneboxer/android_app_store_onebox'
|
|
|
|
|
2013-02-25 11:42:20 -05:00
|
|
|
describe Oneboxer::AndroidAppStoreOnebox do
|
2013-02-13 05:32:18 -05:00
|
|
|
before(:each) do
|
|
|
|
@o = Oneboxer::AndroidAppStoreOnebox.new("https://play.google.com/store/apps/details?id=com.moosoft.parrot")
|
|
|
|
FakeWeb.register_uri(:get, @o.translate_url, :response => fixture_file('oneboxer/android.response'))
|
|
|
|
end
|
2013-02-25 11:42:20 -05:00
|
|
|
|
2013-02-12 07:43:18 -05:00
|
|
|
it "generates the expected onebox for Android App Store" do
|
2013-02-13 05:32:18 -05:00
|
|
|
@o.onebox.should == expected_android_app_store_result
|
2013-02-12 07:43:18 -05:00
|
|
|
end
|
2013-02-25 11:42:20 -05:00
|
|
|
|
2013-02-12 07:43:18 -05:00
|
|
|
private
|
|
|
|
def expected_android_app_store_result
|
|
|
|
<<EXPECTED
|
|
|
|
<div class='onebox-result'>
|
|
|
|
<div class='source'>
|
|
|
|
<div class='info'>
|
|
|
|
<a href='https://play.google.com/store/apps/details?id=com.moosoft.parrot' target="_blank">
|
2013-03-01 18:46:55 -05:00
|
|
|
<img class='favicon' src="/assets/favicons/google_play.png"> play.google.com
|
2013-02-12 07:43:18 -05:00
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class='onebox-result-body'>
|
|
|
|
<img src="https://lh5.ggpht.com/wrYYVu74XNUu2WHk0aSZEqgdCDCNti9Fl0_dJnhgR6jY04ajQgVg5ABMatfcTDsB810=w124" class="thumbnail">
|
|
|
|
<h3><a href="https://play.google.com/store/apps/details?id=com.moosoft.parrot" target="_blank">Talking Parrot</a></h3>
|
|
|
|
|
2013-02-19 12:06:35 -05:00
|
|
|
Listen to the parrot repeat what you say. A Fun application for all ages. Upgrade to Talking Parrot Pro to save sounds, set them as your ringtone and control recording.
|
2013-02-12 09:46:45 -05:00
|
|
|
Press the MENU button to access the settings where you can change the record time and repeat count.
|
|
|
|
This app uses anonymous usage stats to understand and improve performance.
|
|
|
|
Comments and feedback welcome.
|
2013-02-12 07:43:18 -05:00
|
|
|
</div>
|
|
|
|
<div class='clearfix'></div>
|
|
|
|
</div>
|
|
|
|
EXPECTED
|
|
|
|
end
|
2013-02-25 11:42:20 -05:00
|
|
|
end
|