Skip to content

Commit

Permalink
move to "Yast" name space
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 12, 2016
1 parent 66a3564 commit a0f97d2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/packager/product_patterns.rb
Expand Up @@ -15,7 +15,7 @@

require "yast"

module Packager
module Yast

# Evaluate the default patterns for the currently selected products
class ProductPatterns
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Packages.rb
Expand Up @@ -1114,7 +1114,7 @@ def ComputeSystemPatternList
# preselect the default product patterns (FATE#320199)
# note: must be called *after* selecting the products
require "packager/product_patterns"
product_patterns = Packager::ProductPatterns.new
product_patterns = ProductPatterns.new
log.info "Found default product patterns: #{product_patterns.names}"
pattern_list.concat(product_patterns.names)

Expand Down
6 changes: 3 additions & 3 deletions test/packages_test.rb
Expand Up @@ -392,7 +392,7 @@ def product(properties = {})

context "when fips pattern is available" do
before do
allow_any_instance_of(Packager::ProductPatterns).to receive(:names).and_return([])
allow_any_instance_of(Yast::ProductPatterns).to receive(:names).and_return([])
allow(Yast::Pkg).to receive(:ResolvableProperties).
with("fips", :pattern, "").and_return([{ "name" => "fips" }])
end
Expand All @@ -410,7 +410,7 @@ def product(properties = {})

context "when fips pattern is not available" do
before do
allow_any_instance_of(Packager::ProductPatterns).to receive(:names).and_return([])
allow_any_instance_of(Yast::ProductPatterns).to receive(:names).and_return([])
allow(Yast::Pkg).to receive(:ResolvableProperties).
with("fips", :pattern, "").and_return([])
end
Expand All @@ -428,7 +428,7 @@ def product(properties = {})

it "includes the default product patterns in the result" do
default_patterns = [ "default_pattern_1", "default_pattern_2"]
expect_any_instance_of(Packager::ProductPatterns).to receive(:names).at_least(:once).and_return(default_patterns)
expect_any_instance_of(Yast::ProductPatterns).to receive(:names).at_least(:once).and_return(default_patterns)
expect(Yast::Packages.ComputeSystemPatternList).to include(*default_patterns)
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/product_patterns_test.rb
Expand Up @@ -7,7 +7,7 @@

Yast.import "Pkg"

describe Packager::ProductPatterns do
describe Yast::ProductPatterns do
describe "#names" do
it "returns empty list when there are no products" do
expect(Yast::Pkg).to receive(:ResolvableProperties).with("", :product, "")
Expand Down

0 comments on commit a0f97d2

Please sign in to comment.