Skip to content

Commit

Permalink
Include rspec test updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
razorsedge committed Jan 29, 2014
1 parent 1a7eb16 commit f9b95b0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions spec/unit/facts/megaraid_adapters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
it do
Facter.fact(:kernel).stubs(:value).returns('Linux')
Facter.fact(:megacli).stubs(:value).returns('/usr/bin/MegaCli')
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount 2>&1').
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount -NoLog 2>&1').
returns(nil)

Facter.fact(:megaraid_adapters).value.should == '0'
Expand All @@ -28,7 +28,7 @@
it 'should find 0 adapters' do
Facter.fact(:kernel).stubs(:value).returns('Linux')
Facter::Util::Resolution.stubs(:which).with('MegaCli').returns('/usr/bin/MegaCli')
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount 2>&1').
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount -NoLog 2>&1').
returns(File.read(fixtures('megacli', 'adpcount-count_0')))

Facter.fact(:megaraid_adapters).value.should == '0'
Expand All @@ -37,7 +37,7 @@
it 'should find 1 adapters' do
Facter.fact(:kernel).stubs(:value).returns('Linux')
Facter::Util::Resolution.stubs(:which).with('MegaCli').returns('/usr/bin/MegaCli')
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount 2>&1').
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -adpCount -NoLog 2>&1').
returns(File.read(fixtures('megacli', 'adpcount-count_1')))

Facter.fact(:megaraid_adapters).value.should == '1'
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/facts/megaraid_physical_drives_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
Facter.fact(:kernel).stubs(:value).returns('Linux')
Facter.fact(:megacli).stubs(:value).returns('/usr/bin/MegaCli')
Facter.fact(:megaraid_adapters).stubs(:value).returns('1')
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -PDList -aALL').
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -PDList -aALL -NoLog').
returns(nil)

Facter.fact(:megaraid_physical_drives).value.should be_nil
Expand All @@ -48,7 +48,7 @@
Facter.fact(:kernel).stubs(:value).returns('Linux')
Facter.fact(:megacli).stubs(:value).returns('/usr/bin/MegaCli')
Facter.fact(:megaraid_adapters).stubs(:value).returns('1')
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -PDList -aALL').
Facter::Util::Resolution.stubs(:exec).with('/usr/bin/MegaCli -PDList -aALL -NoLog').
returns(File.read(fixtures('megacli', 'pdlistaall')))

Facter.fact(:megaraid_physical_drives).value.should == '10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,184,185,188,189,190,192,194,197,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214'
Expand Down

0 comments on commit f9b95b0

Please sign in to comment.