test/imageshack_test.rb in muri-0.0.4 vs test/imageshack_test.rb in muri-0.0.5
- old
+ new
@@ -2,33 +2,49 @@
shared_examples_for "Imageshack parse" do
it "should be Imageshack service" do
@a.service == 'Imageshack'
end
+ it "should be valid" do
+ @a.valid? == true
+ end
+end
+
+describe "Imageshack parse first" do
+ before(:all) do
+ @a = Muri.parse 'http://img178.imageshack.us/i/dsc01576lo7.jpg/'
+ end
+ it_should_behave_like "Imageshack parse"
it "should have media id" do
@a.media_id == 'dsc01576lo7'
end
- it "should have media url" do
+ it "should have website" do
@a.website == 'http://img178.imageshack.us/i/dsc01576lo7.jpg/'
end
it "should have content_type" do
@a.content_type == 'jpg'
- end
+ end
end
-describe "Imageshack parse first" do
- before(:all) do
- @a = Muri.parse 'http://img178.imageshack.us/i/dsc01576lo7.jpg/'
- end
- it_should_behave_like "Imageshack parse"
-end
describe "Imageshack parse second" do
before(:all) do
@a = Muri.parse 'http://img178.imageshack.us/img178/773/dsc01576lo7.jpg'
end
it_should_behave_like "Imageshack parse"
+
+ it "should have media id" do
+ @a.media_id == 'dsc01576lo7'
+ end
+
+ it "should have website" do
+ @a.website == 'http://img178.imageshack.us/i/dsc01576lo7.jpg/'
+ end
+
+ it "should have content_type" do
+ @a.content_type == 'jpg'
+ end
it "should have website" do
@a.media_url == 'http://img178.imageshack.us/img178/773/dsc01576lo7.jpg'
end
end
\ No newline at end of file