Mailinglist Archive: yast-devel (100 mails)

< Previous Next >
[yast-devel] Cleaner RSpec tests with the new ruby bindings
  • From: Ancor Gonzalez Sosa <ancor@xxxxxxx>
  • Date: Wed, 28 Jan 2015 15:49:45 +0100
  • Message-id: <54C8F709.6060504@suse.de>
We have just added some RSpec extensions to yast-ruby-bindings (>=3.1.28).

As explained in [1], you just need to require "yast/rspec" and you will
have some goodies available in the tests, like the shortcuts we all know
and love (for creating paths, terms and UI elements) and a
#change_scr_root method to safely chroot the tests (with automagic
management of the open SCR instance). Refer to the already mentioned
documentation for a detailed description and to this commit[2] for some
real life examples.

Enjoy.

As usual, the hardest part was having a starting point. Now it's time to
look forward and add more functionality there. What do you miss when
writing YaST tests? Which code do you find repeated over and over in
YaST tests?

Cheers

[1] http://www.rubydoc.info/github/yast/yast-ruby-bindings#Testing
[2]
https://github.com/yast/yast-yast2/commit/b7808cf4d9236e5d1755621f962810735435f3b8

--
Ancor González Sosa
YaST Team at SUSE Linux GmbH
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages