Mailinglist Archive: yast-commit (2114 mails)

< Previous Next >
[yast-commit] <rest-service> master : Stub 'YaST::ConfigFile.path' to fix test
  • From: Klaus Kämpf <kkaempf@xxxxxxx>
  • Date: Sun, 27 Sep 2009 00:12:40 +0200
  • Message-id: <E1MrddL-0001AC-RX@xxxxxxxxxxxxxxxx>
ref: refs/heads/master
commit 726bb239d5bcc377d9a4bfbcd7169019002c8965
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Sun Sep 27 00:12:40 2009 +0200

Stub 'YaST::ConfigFile.path' to fix test
---
plugins/basesystem/test/unit/basesystem_test.rb | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/plugins/basesystem/test/unit/basesystem_test.rb
b/plugins/basesystem/test/unit/basesystem_test.rb
index cfcffa6..803cf7e 100644
--- a/plugins/basesystem/test/unit/basesystem_test.rb
+++ b/plugins/basesystem/test/unit/basesystem_test.rb
@@ -5,14 +5,15 @@ class BasesystemTest < ActiveSupport::TestCase

YAML_CONTENT = <<EOF
steps:
- - controller: systemtime
+ - controller: systemtimes
- controller: language
action: show
EOF

- TEST_STEPS = [{ "controller" => "systemtime"},{"controller" => "language",
"action" => "show"}]
+ TEST_STEPS = [{ "controller" => "systemtimes"},{"controller" => "language",
"action" => "show"}]
def setup
YaST::ConfigFile.stubs(:read_file).returns(YAML_CONTENT)
+ YaST::ConfigFile.any_instance.stubs(:path).returns(__FILE__)
@basesystem = Basesystem.find
end

@@ -24,19 +25,16 @@ EOF
end

def test_steps
- @basesystem = Basesystem.find
assert_equal(TEST_STEPS, @basesystem.steps)
end

def test_finish
- @basesystem = Basesystem.find
assert !@xxxxxxxxxxxxxxxxx
end

def test_save
@basesystem.finish = true
@basesystem.save
- @basesystem = Basesystem.find
assert @basesystem.finish
end

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages