RakutenWebService::Books::Genre
.search
call the endpoint once (FAILED - 1)
has interfaces like hash (FAILED - 2)
has interfaces like hash with snake case key (FAILED - 3)
has interfaces to get each attribute (FAILED - 4)
.new
given a genre id
only call endpint only at the first time to initialize
.root
alias of constructor with the root genre id "000" (FAILED - 5)
#children
When get search method
are Books::Genre objects (FAILED - 6)
when the genre object has no children information
call the endpoint to get children (FAILED - 7)
#search
if the genre_id starts with "001"
delegate Books::Book.search (FAILED - 8)
if the genre_id starts with "002"
delegate Books::CD.search (FAILED - 9)
if the genre_id starts with "003"
delegate Books::DVD.search (FAILED - 10)
if the genre_id starts with "004"
delegate Books::Software.search (FAILED - 11)
if the genre_id starts with "005"
delegate Books::ForeignBook.search (FAILED - 12)
if the genre_id starts with "006"
delegate Books::Game.search (FAILED - 13)
if the genre_id starts with "007"
delegate Books::Magazine.search (FAILED - 14)
RakutenWebService::Kobo::Genre
.search
call the endpoint once (FAILED - 15)
#search
Without arguments
should call RWS::Kobo::Ebook.search with specifying genre id (FAILED - 16)
With arguments
should call RWS::Kobo::Ebook.search with given arguments and genre id (FAILED - 17)
Failures:
1) RakutenWebService::Books::Genre.search call the endpoint once
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
2) RakutenWebService::Books::Genre.search has interfaces like hash
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
3) RakutenWebService::Books::Genre.search has interfaces like hash with snake case key
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
4) RakutenWebService::Books::Genre.search has interfaces to get each attribute
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
5) RakutenWebService::Books::Genre.root alias of constructor with the root genre id "000"
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
6) RakutenWebService::Books::Genre#children When get search method are Books::Genre objects
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
7) RakutenWebService::Books::Genre#children when the genre object has no children information call the endpoint to get children
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
8) RakutenWebService::Books::Genre#search if the genre_id starts with "001" delegate Books::Book.search
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
9) RakutenWebService::Books::Genre#search if the genre_id starts with "002" delegate Books::CD.search
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
10) RakutenWebService::Books::Genre#search if the genre_id starts with "003" delegate Books::DVD.search
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
11) RakutenWebService::Books::Genre#search if the genre_id starts with "004" delegate Books::Software.search
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
12) RakutenWebService::Books::Genre#search if the genre_id starts with "005" delegate Books::ForeignBook.search
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
13) RakutenWebService::Books::Genre#search if the genre_id starts with "006" delegate Books::Game.search
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
14) RakutenWebService::Books::Genre#search if the genre_id starts with "007" delegate Books::Magazine.search
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/books/genre_spec.rb:27:in `block (2 levels) in <top (required)>'
15) RakutenWebService::Kobo::Genre.search call the endpoint once
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/kobo/genre_spec.rb:23:in `block (2 levels) in <top (required)>'
16) RakutenWebService::Kobo::Genre#search Without arguments should call RWS::Kobo::Ebook.search with specifying genre id
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/kobo/genre_spec.rb:23:in `block (2 levels) in <top (required)>'
17) RakutenWebService::Kobo::Genre#search With arguments should call RWS::Kobo::Ebook.search with given arguments and genre id
Failure/Error: to_return(:body => expected_json)
WebMock::Response::InvalidBody:
must be one of: [Proc, IO, Pathname, String, Array]. 'Hash' given
# ./spec/rakuten_web_service/kobo/genre_spec.rb:23:in `block (2 levels) in <top (required)>'