Skip to content

Commit

Permalink
Missing spec
Browse files Browse the repository at this point in the history
  • Loading branch information
zetaben committed Aug 24, 2010
1 parent d3619ab commit bd25706
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/opdsparser_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

def sample(type)
File.open( File.expand_path(File.dirname(__FILE__) + "/../samples/#{type}.txt"))
end

describe OPDS::OPDSParser do

[:entry, :acquisition, :navigation].each do |feed_type|
it "should parse entry without error" do
lambda { subject.parse(sample(feed_type)) }.should_not raise_error
end

it "should should sniff entry" do
subject.parse(sample(feed_type))
subject.sniffed_type.should be(feed_type)
end
end
end

0 comments on commit bd25706

Please sign in to comment.