Add test coverage that proxy correctly re-raises NoMethodError

This commit is contained in:
Marc Siegel 2013-07-05 16:34:26 -04:00
parent c59b06bef7
commit b7d43ac57e
1 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,10 @@ describe Docile do
Docile.dsl_eval(arr) { __id__.should_not == arr.__id__ }
end
it "should raise NoMethodError if the DSL object doesn't implement the method" do
expect { Docile.dsl_eval([]) { no_such_method } }.to raise_error(NoMethodError)
end
Pizza = Struct.new(:cheese, :pepperoni, :bacon, :sauce)
class PizzaBuilder