Skip to content

Commit

Permalink
Fixed !GetAZs on Ruby 2
Browse files Browse the repository at this point in the history
  • Loading branch information
drrb committed Sep 28, 2014
1 parent 81513aa commit 8fa7ae6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion features/yamly_shortcuts.feature
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Feature: YAMLy shortcuts
Scenario: AZ listing with empty string
Given I have a file "map.yml" containing
"""
AvailabilityZones: !GetAZs ""
AvailabilityZones: !GetAZs
"""
When I process "map.yml"
Then the output should match JSON
Expand Down
3 changes: 2 additions & 1 deletion spec/cfoo/yaml_parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ module Cfoo
it "converts empty AZ lookups to GetAZs function-calls" do
write "#{working_dir}/get_azs_empty.yml", "!GetAZs ''"

parser.load_file("#{working_dir}/get_azs_empty.yml").should == YAML::DomainType.create("GetAZs", "")
value = YAML.name == "Psych" ? nil : ""
parser.load_file("#{working_dir}/get_azs_empty.yml").should == YAML::DomainType.create("GetAZs", value)
end
end
end
Expand Down

2 comments on commit 8fa7ae6

@agperson
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I should have tested with earlier Ruby versions.

@drrb
Copy link
Owner Author

@drrb drrb commented on 8fa7ae6 Sep 30, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries :)

Please sign in to comment.