summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMichael Herold <opensource@michaeljherold.com>2018-08-14 21:33:09 -0500
committerMichael Herold <opensource@michaeljherold.com>2018-08-14 21:33:09 -0500
commita59d200849b1f579f4ff4369816ea7aeba295fd6 (patch)
tree44489a9651dd14001b14766b56713126c4770286 /spec
parent955d1713a4c101cb9e68020ddb7fe956be734c78 (diff)
downloadhashie-a59d200849b1f579f4ff4369816ea7aeba295fd6.tar.gz
Fix a regression with aliases on `Mash.load`
Also, reorganize the test into the existing file and update the changelog.
Diffstat (limited to 'spec')
-rw-r--r--spec/hashie/mash_is_loading_yaml_spec.rb8
-rw-r--r--spec/hashie/mash_spec.rb8
2 files changed, 8 insertions, 8 deletions
diff --git a/spec/hashie/mash_is_loading_yaml_spec.rb b/spec/hashie/mash_is_loading_yaml_spec.rb
deleted file mode 100644
index f7edea4..0000000
--- a/spec/hashie/mash_is_loading_yaml_spec.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-require "spec_helper"
-
-context "load yaml" do
- it do
- mash = Hashie::Mash.load("spec/fixtures/yaml_with_aliases.yml")
- expect(mash.company_a.accounts.admin.password).to eq "secret"
- end
-end
diff --git a/spec/hashie/mash_spec.rb b/spec/hashie/mash_spec.rb
index 680f403..b46bd6c 100644
--- a/spec/hashie/mash_spec.rb
+++ b/spec/hashie/mash_spec.rb
@@ -694,6 +694,14 @@ describe Hashie::Mash do
expect(subject.object_id).to eq subject.object_id
end
end
+
+ context 'when the file has aliases in it' do
+ it 'can use the aliases and does not raise an error' do
+ mash = Hashie::Mash.load('spec/fixtures/yaml_with_aliases.yml')
+
+ expect(mash.company_a.accounts.admin.password).to eq('secret')
+ end
+ end
end
describe '#to_module(mash_method_name)' do