Skip to content

Commit

Permalink
Merge b8835b1 into 45fb807
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Jan 21, 2022
2 parents 45fb807 + b8835b1 commit 1a24821
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
6 changes: 4 additions & 2 deletions console/test/console_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
let(:full_language) { "es_ES.UTF-8" }
let(:language) { "es_ES" }
let(:os_release_id) { "sles" }
# read it from the system, it might be different in Leap and Tumbleweed
let(:default_encoding) { `LC_CTYPE=#{language} locale charmap`.strip }

before do
allow(Yast::Linuxrc).to receive(:braille).and_return(braille)
Expand All @@ -31,7 +33,7 @@
end

it "returns the encoding" do
expect(Yast::Console.SelectFont(language)).to eq("ISO-8859-1")
expect(Yast::Console.SelectFont(language)).to eq(default_encoding)
end

context "when no console font is available" do
Expand All @@ -41,7 +43,7 @@
end

it "returns the encoding" do
expect(Yast::Console.SelectFont(language)).to eq("ISO-8859-1")
expect(Yast::Console.SelectFont(language)).to eq(default_encoding)
end
end

Expand Down
1 change: 1 addition & 0 deletions language/test/widgets/language_selection_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
allow(Yast::Language).to receive(:GetLanguageItems)
allow(Yast::Language).to receive(:GetLanguageItems)
.with(:first_screen).and_return(LANGUAGE_ITEMS)
allow(Yast::WFM).to receive(:SetLanguage)
end

shared_examples "switch language" do |method|
Expand Down
6 changes: 6 additions & 0 deletions package/yast2-country.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jan 21 08:27:16 UTC 2022 - Ladislav Slezák <lslezak@suse.cz>

- Unify YaST module mocking in unit tests (related to bsc#1194784)
- 4.4.9

-------------------------------------------------------------------
Wed Jan 19 09:27:28 UTC 2022 - Martin Vidner <mvidner@suse.com>

Expand Down
6 changes: 3 additions & 3 deletions package/yast2-country.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#

Name: yast2-country
Version: 4.4.8
Version: 4.4.9
Release: 0
Summary: YaST2 - Country Settings (Language, Keyboard, and Timezone)
License: GPL-2.0-only
Expand All @@ -33,8 +33,8 @@ BuildRequires: rubygem(%rb_default_ruby_abi:rspec)
BuildRequires: rubygem(%rb_default_ruby_abi:yast-rake)
# Fix to bnc#891053 (proper reading of ".target.yast2" on chroots)
BuildRequires: yast2-core >= 3.1.12
# RSpec extensions for YaST
BuildRequires: yast2-ruby-bindings >= 3.1.26
# yast/rspec/helpers.rb
BuildRequires: yast2-ruby-bindings >= 4.4.7
# Yast2::CommandLine readonly parameter
BuildRequires: yast2 >= 4.2.57
# systemd-mini does not add the xkb generated map which is needed by
Expand Down
9 changes: 2 additions & 7 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,5 @@
end
end

# stub module to prevent its Import
# Useful for modules from different yast packages, to avoid build dependencies
def stub_module(name)
Yast.const_set name.to_sym, Class.new { def self.fake_method; end }
end

stub_module("AutoInstall")
# stub classes from other modules to avoid build dependencies
Yast::RSpec::Helpers.define_yast_module("AutoInstall")

0 comments on commit 1a24821

Please sign in to comment.