I am developing a Ruby gem which is meant to be used as a library or API (With no CLI) for another Ruby/Rails application.
I was planning to use Cucumber/Rspec for developing this gem using outside in BDD concepts. Before writing the Cucumber features I did some research and observed that Cucumber is mostly used for specifying the user interface of gems and not for specifying the API. Let me know what tools will you use for this kind of a situation and how you will use it.
Generally Cucumber specs cover high level usage scenarios of your software and RSpec covers interface of your classes at the lower level.
Cucumber is useful when you want to let non-technical customer/product owner to help you write acceptance tests – with Cucumber you build business-readable DSL for them.
As far as customers of your program (gem) are programmers and you don’t provide any user interface (only API), you can use RSpec and don’t add Cucumber. RSpec specs will cover all public methods of your API and will provide good specification for the gem.
If you want to cover complicated usage scenario of your product (when user calls several methods to achieve the result), it might be useful to add Cucumber specification, but you can also write high level tests with RSpec.
Summary: For gem development Cucumber looks like an overkill and I would start with RSpec only.