Please indent lines, it is quite hard to read it from here. Another option can be store such data in file and read it during test like
```
stub_file = File.expand_path("../ifconfig-common.output", __FILE__)
Yast::SCR.stub(:Execute).with(Yast::Path.new(".target.bash_output"), "LC_ALL=POSIX /sbin/ifconfig").and_return ("stdout" => File.read(stub_file))
```

This way you stub SCR instead of your own method and also it is easier to read test.
Drawback is that you have data in two places ( in stdout file and in test when you verify values )