spec/schematic/generator/sandbox_spec.rb in schematic-0.4.0 vs spec/schematic/generator/sandbox_spec.rb in schematic-0.4.1

- old
+ new

@@ -47,7 +47,21 @@ end subject.added_elements[:foo].should == [:bar] end end end + + describe "methods on original object get called when not difined in sandbox module" do + before do + klass.stub(:foo) + end + + it "should delegate missing methods to klass" do + klass.should_receive(:foo) + + subject.run do + self.foo + end + end + end end