-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue: When a hash key is named 'test', everything blows up
- Loading branch information
Kaspar Schiess
committed
Nov 8, 2012
1 parent
e7dfdb7
commit 8616612
Showing
2 changed files
with
16 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node 'node' do |cfg| | ||
cook 'test' | ||
end |
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,13 @@ | ||
require 'spec_helper' | ||
|
||
describe "bocuse environment" do | ||
let(:project) { Bocuse::Project.new(fixture('cook')) } | ||
|
||
it "exports node_name" do | ||
pending "Open issue" do | ||
expect { | ||
project.nodes['node'].to_h | ||
}.not_to raise_error | ||
end | ||
end | ||
end |
8616612
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You probably know all this, but for the sake of onlookers:
The problem is that the
BlankSlate
Bocuse::Configuration
has a private method called#test
. What we want ismethod_missing
to be called. Instead, the existing private method is called. Since we use Ruby 1.9 in bocuse, we could theoretically make use of#public_send
which respects visibility. However,BlankSlate
does not implement that method, which in our case would result in:public_send
being added to the configuration with the value"test"
.The options probably are: