test/twitpic_test.rb in muri-1.0.0 vs test/twitpic_test.rb in muri-1.1.0

- old
+ new

@@ -1,19 +1,36 @@ require 'lib/muri.rb' shared_examples_for "Twitpic parse" do it "should be Twitpic service" do - @a.media_service.should == 'Twitpic' + #@a.media_service.should == 'Twitpic' + @a.is_twitpic?.should == true end + + it "should be not be other services" do + @a.is_vimeo?.should == false + @a.is_youtube?.should == false + @a.is_facebook?.should == false + @a.is_flickr?.should == false + end + it "should be valid" do @a.valid?.should == true end end shared_examples_for "Twitpic parse photo" do it_should_behave_like "Twitpic parse" it "should have media api type = TWITPIC_PHOTO" do @a.media_api_type.should == Muri::TWITPIC_PHOTO + end + + it "should be twitpic photo" do + @a.is_twitpic_photo?.should == true end + + it "should not be facebook photo" do + @a.is_facebook_photo?.should == false + end end {'http://twitpic.com/17d7th' => { :media_id => '17d7th', :media_website => "http://twitpic.com/17d7th", :media_api_id => '17d7th',