Mailinglist Archive: yast-devel (17 mails)

< Previous Next >
Re: [yast-devel] RSpec3 accepted in SLE12-SP1, it can be used in Git "master" branch
On Thu, 30 Jul 2015 11:07:25 +0200
Ladislav Slezak <lslezak@xxxxxxx> wrote:


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-doubles



--

Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
lslezak@xxxxxxxx
SUSE

--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
References