spec/finders_spec.rb in data_paths-0.3.0.rc2 vs spec/finders_spec.rb in data_paths-0.3.0
- old
+ new
@@ -37,6 +37,18 @@
subject.glob_data_paths('*/*.txt').should == [
File.join(Helpers::DATA_DIRS[0],'dir','two.txt'),
File.join(Helpers::DATA_DIRS[1],'dir','two.txt')
]
end
+
+ it "should load the first found YAML file" do
+ data = subject.load_yaml_file('data.yml')
+
+ data.should == {'one' => 1}
+ end
+
+ it "should load all matching YAML files" do
+ data = subject.load_yaml_files('data.yml')
+
+ data.should == [{'one' => 1}, {'two' => 2}]
+ end
end