spec/google/book/entry_spec.rb in google-book-0.3.3 vs spec/google/book/entry_spec.rb in google-book-0.4.0
- old
+ new
@@ -152,9 +152,22 @@
it "should return nil if there is no publisher" do
entry.publisher.should be_nil
end
end
+ describe "#rating" do
+ it "should return a rating" do
+ entry.instance_variable_set(:@hash, {
+ 'gd:rating' => {
+ 'min' => '1',
+ 'max' => '5',
+ 'average' => '4.44'
+ }
+ })
+ entry.rating.should eql 4.44
+ end
+ end
+
describe "#title" do
it "should concatenate titles" do
entry.instance_variable_set(:@hash, {
'dc:title' => ['Thousand Plateaus', 'Capitalism and Schizophrenia']
})