On Thu, 30 Jul 2015 11:07:25 +0200
Ladislav Slezak
Hi all,
I have a good news for you, RSpec has been updated to version 3 in SLE12-SP1! (Specifically to 3.3.x, I submitted the same version as is currently in Factory.)
That means we can now use RSpec3 syntax and the new features in the `master` Git branch! Of course you have to be careful when backporting a SLE12 maintenance fix, there is still RSpec2 in SLE12-GA...
See [1] for a nice overview of changes from RSpec2 to RSpec3.
Probably the most important new RSpec3 feature is the "verifying doubles" ability. That feature checks that the mocked method is actually present on the specified object. This avoids mocking non-existing methods which can make the test pass but when the code is really executed it would fail with "NoMethod" error.
See [2] and [3] for more details, see [4] how to enable it as the feature is disabled by default for backward compatibility.
I think we should really consider to enable this feature by default in yast/rspec as it is very useful feature. Josef
Enjoy!
[1] http://rspec.info/blog/2014/05/notable-changes-in-rspec-3 [2] http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#verifying-doubles [3] https://relishapp.com/rspec/rspec-mocks/docs/verifying-doubles [4] https://relishapp.com/rspec/rspec-mocks/v/3-3/docs/verifying-doubles/partial...
--
Ladislav Slezák Appliance department / YaST Developer Lihovarská 1060/12 190 00 Prague 9 / Czech Republic tel: +420 284 028 960 lslezak@suse.com SUSE
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org