Replies: 1 comment 1 reply
-
Hi Graham! As long as it doesn't require changes to the public API, and to the definition of methods, I think it would be interesting to support Minitest. Mostly, I don't want to increase the maintenance burden by tracking the list of methods twice, as I don't use Minitest myself and don't have a large (real) codebase where I can test upgrades. Something that might make it possible to support Minitest with relatively minimal changes, is that for the most part there's a single abstraction for how the methods are delegated to Capybara. Assuming that Capybara follows the same naming pattern for RSpec and Minitest helpers, it would be possible to change the generated code from: "#{ assertion ? "expect(#{ target }).to_or not_to, test_context" : target }.#{ method_name }(*args, **kwargs, &filter)" to something like: "#{ target }.send('#{ assertion ? not_to ? 'wont_' : 'must_' : '' }#{ method_name }', *args, **kwargs, &filter)" Then, it would be a matter of replacing If this works as intended, the advantage is that the public-facing API stays unchanged, so the documentation is valid for both. |
Beta Was this translation helpful? Give feedback.
-
I've been looking for something to make the page object pattern easier, and this looks like exactly what I want! Unfortunately it seems to only support RSpec for now.
Would you be open to receiving pull requests for adding Minitest support? I haven't dug deep into the code to see how much work that would be, wanted to check that would be something you'd be open to before I spend too much time investigating.
Beta Was this translation helpful? Give feedback.
All reactions