Skip to content

Instantly share code, notes, and snippets.

Created November 12, 2015 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c5b404b852cbea02ebfa to your computer and use it in GitHub Desktop.
Save anonymous/c5b404b852cbea02ebfa to your computer and use it in GitHub Desktop.
gem 'cucumber'
def is_palindrome(str)
if str.downcase.reverse == str.downcase
puts('palindrome')
else
puts('NOT a palindrome')
end
end
puts 'Enter a string'
input_str = gets
is_palindrome(input_str.chomp)
Feature: lower case palindromes
This is testing the input of lower case strings
that may be palindromes
Scenario: testing lowercase
Given I am string hello
When I input a string
Then is should not be a palindrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment