Skip to content
Browse files

wrong datatype for rating: Fixnum instead of Float

  • Loading branch information...
1 parent a69afcb commit 66c6325cdea5667a32a2fa11f4def446ecb8f097 @zealot128 zealot128 committed Jul 22, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −0 features/movie.feature
  2. +2 −2 lib/imdb/movie.rb
View
1 features/movie.feature
@@ -19,6 +19,7 @@ Feature: Get movie information
Given I have movie name called "Dr. Horrible's Sing-Along Blog"
When I get first entry from result set
Then the release year should be 2008
+ And the title should be "Dr. Horrible's Sing-Along Blog"
Scenario: Title of minor movies is different
Given I have movie name called "Kunpan: Legend of the Warlord"
When I get first entry from result set
View
4 lib/imdb/movie.rb
@@ -16,7 +16,7 @@ def initialize(id_of)
:photos => Array,
:director => String,
:genres => Array,
- :rating => Fixnum,
+ :rating => Float,
:short_description => String,
:writers => Array}, [:imdb_id])
@@ -96,7 +96,7 @@ def genres
end
# Writer List
- # @return [Fixnum]
+ # @return [Float]
def rating
@rating ||= doc.search(".star-box-giga-star").text.strip.to_f
rescue

0 comments on commit 66c6325

Please sign in to comment.
Something went wrong with that request. Please try again.