yamload 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yamload/loader.rb +2 -0
- data/lib/yamload/version.rb +1 -1
- data/spec/loader_spec.rb +12 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdaf18e91f87fa915da696af9e2d41d171313512
|
4
|
+
data.tar.gz: 93ed1e30105693344286755d3bd04db2f22d9032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8be6ad15459108a185e1d68c256e8174a7f7f2e92579c057184fcd28d94dbf9cdd4ec04674cb15e8e9fc0051c60d0d748e3ab67eafe52ed0d58ea07a494b4310
|
7
|
+
data.tar.gz: 2d2ce03a03a7818d5195e5d1efe8eaf0c1c1439ab6bbd41dff97587cc178758a31ee4c1f3b5a125fad41df3706ddbd2453be8c6b5ac84f933d00a2104737d147
|
data/lib/yamload/loader.rb
CHANGED
data/lib/yamload/version.rb
CHANGED
data/spec/loader_spec.rb
CHANGED
@@ -8,6 +8,18 @@ describe Yamload do
|
|
8
8
|
|
9
9
|
specify { expect(loader).to exist }
|
10
10
|
|
11
|
+
context 'if the directory is not specified' do
|
12
|
+
let(:loader) { Yamload::Loader.new(file, nil) }
|
13
|
+
specify { expect { config }.to raise_error IOError, 'No yml files directory specified' }
|
14
|
+
end
|
15
|
+
|
16
|
+
context 'if the directory is invalid' do
|
17
|
+
let(:current_file_dir) { File.expand_path(File.dirname(__FILE__)) }
|
18
|
+
let(:invalid_dir) { File.join(current_file_dir, 'invalid') }
|
19
|
+
let(:loader) { Yamload::Loader.new(file, invalid_dir) }
|
20
|
+
specify { expect { config }.to raise_error IOError, "#{invalid_dir} is not a valid directory" }
|
21
|
+
end
|
22
|
+
|
11
23
|
context 'with a non existing file' do
|
12
24
|
let(:file) { :non_existing }
|
13
25
|
specify { expect(loader).not_to exist }
|