acook / config_module

Load important configuration files into their own modules
MIT License
2 stars 2 forks source link

Consider replacing uSpec with Rspec #18

Closed acook closed 5 years ago

acook commented 9 years ago

When I started this project, Rspec was a lumbering monolith, and many times larger than config_module's codebase, so I used my testing micro-framework uSpec instead.

Rspec has seen some serious improvements over the intervening time and some of its features might come in handy.

Basically the question that needs to be answered is if there's a clear win in using Rspec over uSpec.

Spaceghost commented 9 years ago

RSpec is nice because rails developers know it really well. minitest is nice because rubyists know it even if they've never used the library before.

RSpec seems a better direction if you want to make it easy for people to contribute.

acook commented 9 years ago

@Spaceghost true, but uSpec is "just Ruby". The syntax isn't weird - because there's almost none.

Here's some example code (from config_module's specs):

spec 'modules extended with ConfigModule will load configurations' do
  ExampleConfig.foo == 'bar'
end

spec 'modules extended with ConfigModule have "namespace" methods' do
  ExampleConfig.methods.include? :namespace
end
acook commented 9 years ago

Here's the output up on Travis-CI:

screen shot 2015-10-02 at 19 23 23

Currently the test suite runs in less time than Rspec takes to load too.

Spaceghost commented 9 years ago

I'm not against it. It looks pretty simple and clean and I get how I'd use it just from seeing a single test.

acook commented 5 years ago

uSpec seems to be doing just fine right now.