Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into package_callbacks_c…
Browse files Browse the repository at this point in the history
…leaning

Conflicts:
	library/packages/src/modules/PackageCallbacks.rb
  • Loading branch information
jreidinger committed Jan 29, 2015
2 parents 7d6c61e + b7808cf commit 6582ff3
Show file tree
Hide file tree
Showing 19 changed files with 751 additions and 804 deletions.
9 changes: 4 additions & 5 deletions .travis.yml
Expand Up @@ -7,11 +7,10 @@ before_install:
- wget https://raw.githubusercontent.com/yast/yast-devtools/master/travis-tools/travis_setup.sh
- sh ./travis_setup.sh -p "rake yast2-core yast2-devtools yast2-testsuite yast2-ruby-bindings yast2 yast2-pkg-bindings" -g "rspec:2.14.1 yast-rake gettext rubocop:0.28.0"
script:
- rake check:syntax
- rake check:pot
- rubocop
- make -f Makefile.cvs
- make
- sudo make install
- make check
- make -s -f Makefile.cvs
- make -s
- sudo make -s install
- make -s check

10 changes: 3 additions & 7 deletions library/general/test/agents_test/netd_agent_test.rb
Expand Up @@ -3,17 +3,13 @@

module Yast
describe ".etc.xinetd_conf.services" do
before :each do
around :each do |example|
root = File.join(File.dirname(__FILE__), "test_root")
assign_root_path(root)
end

after :each do
reset_root_path
change_scr_root(root, &example)
end

describe ".Read" do
let(:content) { SCR.Read(Path.new(".etc.xinetd_conf.services")) }
let(:content) { SCR.Read(path(".etc.xinetd_conf.services")) }

it "reads content of /etc/xinetd.d and returns array" do
expect(content).to be_a(Array)
Expand Down
10 changes: 3 additions & 7 deletions library/general/test/agents_test/proc_meminfo_agent_test.rb
Expand Up @@ -4,17 +4,13 @@
require "yast"

describe ".proc.meminfo" do
before :each do
around :each do |example|
root = File.join(File.dirname(__FILE__), "test_root")
assign_root_path(root)
end

after :each do
reset_root_path
change_scr_root(root, &example)
end

describe ".Read" do
let(:content) { Yast::SCR.Read(Yast::Path.new(".proc.meminfo")) }
let(:content) { Yast::SCR.Read(path(".proc.meminfo")) }

it "read content of /proc/meminfo return hash" do
expect(content).to be_a(Hash)
Expand Down
4 changes: 2 additions & 2 deletions library/general/test/event_dispatcher_test.rb
Expand Up @@ -4,7 +4,7 @@

require "ui/event_dispatcher"

class TestDialog
class DispatcherTestDialog
include Yast::UIShortcuts
include UI::EventDispatcher
Yast.import "UI"
Expand Down Expand Up @@ -38,7 +38,7 @@ def again_handler_called?
end

describe UI::EventDispatcher do
subject { TestDialog.new }
subject { DispatcherTestDialog.new }

def mock_ui_events(*events)
allow(Yast::UI).to receive(:UserInput).and_return(*events)
Expand Down
11 changes: 1 addition & 10 deletions library/general/test/test_helper.rb
Expand Up @@ -3,13 +3,4 @@
ENV["Y2DIR"] = inc_dirs.join(":")

require "yast"

def assign_root_path(directory)
check_version = false
handle = Yast::WFM.SCROpen("chroot=#{directory}:scr", check_version)
Yast::WFM.SCRSetDefault(handle)
end

def reset_root_path
Yast::WFM.SCRClose(Yast::WFM.SCRGetDefault)
end
require "yast/rspec"

0 comments on commit 6582ff3

Please sign in to comment.