Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Aug 10, 2017
1 parent 8b2b2fc commit cf5cc8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion test/system_settings_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@
KERNEL_SYSRQ_FILE = "/proc/sys/kernel/sysrq"

subject(:settings) { Yast::SystemSettings }
let(:scheduler) { "cfq" }

before do
allow(File).to receive(:exist?).and_return(true)
allow(Yast::Bootloader).to receive(:Read)
allow(Yast::Bootloader).to receive(:kernel_param)
.with(:common, "elevator").and_return(scheduler)
settings.main
end

Expand All @@ -24,7 +28,6 @@
describe "#Read" do
let(:kernel_sysrq) { "1" }
let(:sysctl_sysrq) { "1" }
let(:scheduler) { "cfq" }

before do
allow(Yast::SCR).to receive(:Read).and_call_original
Expand Down
4 changes: 2 additions & 2 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
add_filter "/spec/"
end

# for coverage we need to load all ruby files
src_location = File.expand_path("../../src", __FILE__)
Dir["#{src_location}/{modules,lib}/**/*.rb"].each { |f| require_relative f }
# track all ruby files under src
SimpleCov.track_files("#{src_location}/**/*.rb")

# use coveralls for on-line code coverage reporting at Travis CI
if ENV["TRAVIS"]
Expand Down

0 comments on commit cf5cc8d

Please sign in to comment.