-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from benjaminws/software_dirs
Refactor how we handle loading dirs for software files.
- Loading branch information
Showing
2 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
require 'omnibus' | ||
require 'spec_helper' | ||
|
||
describe Omnibus do | ||
|
||
describe '#software_dirs' do | ||
|
||
before :each do | ||
# This is probably really silly, but it works | ||
Omnibus.class_eval { @software_dirs = nil } | ||
end | ||
|
||
context 'omnibus_software_root not nil' do | ||
before :each do | ||
Omnibus.stub(:omnibus_software_root) { './data' } | ||
end | ||
|
||
it 'will include list of software from omnibus-software gem' do | ||
Omnibus.software_dirs.length.should eq 2 | ||
end | ||
end | ||
|
||
context 'omnibus_software_root nil' do | ||
before :each do | ||
Omnibus.stub(:omnibus_software_root) { nil } | ||
end | ||
|
||
it 'will not include list of software from omnibus-software gem' do | ||
Omnibus.software_dirs.length.should eq 1 | ||
end | ||
end | ||
end | ||
|
||
end |