Dne 2.9.2013 12:29, Josef Reidinger napsal(a):
Well, I play a bit with minitest and must say that it contain bunch of
functionality, but there is two really annoying things about it.

1) It mocking mechanism - it is limited to be used only in block, so it
cannot be used in before stage

To clarify the impact: This means that tests with mocks would contain duplicate code. Of course, this could be avoided by using some custom mocking framework, like Mocha [1], but:

  1. There can be integration issues between Mocha and minitest, so
     this combo would need to be tested first.

  2. The main advantage of minitest -- being included in Ruby stdlib --
     would be lost, as we would be dependent on Mocha too.

I should add that RSpec already contains a mocking framework, very similar to Mocha. It works well in my experience (I used it on multiple projects).

2) output of spec-style writing. In fact it just translate it into
test/unit tests and output is quite horrible compared to rspec.

Could you provide an example output?

One thing I value on RSpec is the --format=documentation output:

  http://ascii.io/a/5272

This allows one to see specs in structured way, which makes it easier to spot organization & clarity issues, refactor & restructure the specs, etc. And it serves as a documentation of capabilities of the tested classes (if one writes the spec descriptions well).

[1] http://gofreerange.com/mocha/docs/

--
David Majda
SUSE Studio developer
http://susestudio.com/
--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to