1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
thoughtbot--shoulda-matchers/spec/support/acceptance/helpers/pluralization_helpers.rb
2014-11-05 09:53:33 -07:00

13 lines
302 B
Ruby

module AcceptanceTests
module PluralizationHelpers
def pluralize(count, singular_version, plural_version = nil)
plural_version ||= singular_version + 's'
if count == 1
"#{count} #{singular_version}"
else
"#{count} #{plural_version}"
end
end
end
end