📸 Photo by Joshua Fuller on Unsplash
I am working on a static site generator using just Ruby and a few gems.
It seems that testing with RSpec is the way to go, however most tutorials or blog posts associate RSpec with Rails and I don't have, want, or need a Rails component to this; it's just a CLI tool.
My question is can I use RSpec with a pure Ruby CLI tool or should I try something like Minitest instead?
**Oh and maybe someone would be willing to take a look at what I've got?"
twhite96 / static-gen-ruby
A static site generator scaffold built with Ruby
A static site generator built with Ruby.
How to use:
🌀Clone the repo at
https://github.com/twhite96/static-gen-ruby.gitor with GitHub CLI
gh repo clone twhite96/static-gen-ruby
bundleto install dependencies.
🎊Have fun with it.
Motivation for this app
I wanted to show that I could build something, even if it was small, on my own, with little guidance.
Ben Halpern started a thread about his generator on DEV and I took his scaffold and ran with it.
Just getting the script running is a win for me, as I am not a Ruby dev at all.
Top comments (1)
You can totally use Rspec for testing your non-Rails CLI! RuboCop does it too, here's an example: github.com/rubocop/rubocop/pull/11...