rubydatabase-cleaner

Get loaded database_clenaer gem version


DatabaseCleaner doesn't expose a way to inquiry the version. The version is done via YAML file. How could I know the loaded gem version?


Solution

  • You could load the specification from RubyGems:

    Gem.loaded_specs["database_cleaner"].version.to_s