Last active
August 29, 2015 13:57
-
-
Save sranso/9602483 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './palindrome' | |
describe '#next_palindrome' do | |
it "should return the next smallest number that is greater than the given number which is a palindrome" do | |
expect(next_palindrome(121)).to eq(131) | |
end | |
it "should return the next smallest number that is greater than the given number which is a palindrome" do | |
expect(next_palindrome(1221)).to eq(1331) | |
end | |
it "should return the next smallest number that is greater than the given number which is a palindrome" do | |
expect(next_palindrome(1991)).to eq(2002) | |
end | |
it "should return the next smallest number that is greater than the given number which is a palindrome" do | |
expect(next_palindrome(2199912)).to eq(2200022) | |
end | |
it "should return the next smallest number that is greater than the given number which is a palindrome" do | |
expect(next_palindrome(2129212)).to eq(2130312) | |
end | |
it "should return the next smallest number that is greater than the given number which is a palindrome" do | |
expect(next_palindrome(999)).to eq(1001) | |
end | |
it "should return the next smallest number that is greater than the given number which is a palindrome" do | |
expect(next_palindrome(99)).to eq(101) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment