I’ve stuck with the defaults on my first Hanami project. Namely Minitest::Spec. I’m trying to get into the BDD flow but find the 8 second startup time to run a single test a little slow. I know, Rails is no better but it does at least have Spring, Spork, etc.
Has anyone looked into speeding things up? Could we get different groups of tests to require more specific parts of the framework?
Happy to do some investigation but if anyone has a starting point or ideas to help kick things off I would appreciate it.
As a Rails developer of 10 years I’m lovin’ the clean design of this framework. Great job!
Fullstack Ruby developer
Okay to partially answer my own question for an Interactor spec all I needed was:
I’m assuming other types of tests will require more of the framework but it’s a good start.
Sorry for the late reply. May I ask you how many bundled gems do you have in
No problem at all!
Here’s the Gemfile, however I’ve tried just requiring the bare minimum and that doesn’t seem to affect load time:
gem 'hanami', '~> 1.0'
gem 'hanami-model', '~> 1.0'
group :development do
group :test, :development do
gem 'dotenv', '~> 2.0'
gem 'pry', require: false
group :test do
I should also mention that I’m running on Ubuntu on Windows which will probably also affect load time. I’ll try on a VM when I get a chance.
Apologies, it must indeed be due to running on Ubuntu on Windows. I’ve just run the same project on an Archliunx VM and the tests take barely a second. Back to a VM for me I think.
It looks like there are some suggested workarounds related to Rails load times and /tmp location. I’ll post if I find a solution.