spec/google/book/struct_spec.rb in google-book-0.2.1 vs spec/google/book/struct_spec.rb in google-book-0.2.2

- old
+ new

@@ -34,43 +34,61 @@ book.formatted_formats.should eql 'foo' end end describe "#formatted_publisher" do - it "should drop Inc at the end of the word" do + it "should drop Inc at the end of the name" do book.publisher = 'Publisher Inc' book.formatted_publisher.should eql 'Publisher' book.publisher = 'Random House, Inc.' book.formatted_publisher.should eql 'Random House' end + it "should drop Llc at the end of the name" do + book.publisher = 'Publisher Llc' + book.formatted_publisher.should eql 'Publisher' + + book.publisher = 'Publisher LLC' + book.formatted_publisher.should eql 'Publisher' + end + + it "should drop Ltd at the end of the name" do + book.publisher = 'Publisher Ltd' + book.formatted_publisher.should eql 'Publisher' + end + it "should format Intl" do book.publisher = 'Continuum Intl' book.formatted_publisher.should eql 'Continuum International' end it "should format Pr" do book.publisher = 'Polity Pr' book.formatted_publisher.should eql 'Polity Press' end - it "should format Pub" do + it "should format Pub at the end of the name" do book.publisher = 'Rowman & Littlefield Pub' book.formatted_publisher.should eql 'Rowman & Littlefield Publishers' end + it "should format Pubns at the end of the name" do + book.publisher = 'Publisher Pubns' + book.formatted_publisher.should eql 'Publisher Publications' + end + it "should format Pub Group" do book.publisher = 'Continuum International Pub Group' book.formatted_publisher.should eql 'Continuum International Publishing Group' end - it "should format Univ in the middle of the word" do + it "should format Univ in the middle of the name" do book.publisher = 'Columbia Univ Press' book.formatted_publisher.should eql 'Columbia University Press' end - it "should format Univ at the end of the word" do + it "should format Univ at the end of the name" do book.publisher = 'Columbia Univ' book.formatted_publisher.should eql 'Columbia University' end end