Re: [rspec-users] Stubbing through multiple layers

2010-01-10 Thread Courtenay
On Sat, Jan 9, 2010 at 7:38 PM, Sean DeNigris wrote: >>   window = stub('window', :title => "programming_ruby_1.9.pdf") >>   preview = stub('preview', :front_window => window) > Perfect - so easy!  Thanks. > There's also stub_chain, which is probably a Bad Thing but helps break through layers of

Re: [rspec-users] Stubbing through multiple layers

2010-01-10 Thread David Chelimsky
On Sat, Jan 9, 2010 at 9:38 PM, Sean DeNigris wrote: > > window = stub('window', :title => "programming_ruby_1.9.pdf") > > preview = stub('preview', :front_window => window) > Perfect - so easy! Thanks. > > > If you have good high level specs with something like Cucumber or > FitNesse, > > th

Re: [rspec-users] Stubbing through multiple layers

2010-01-10 Thread Sean DeNigris
> window = stub('window', :title => "programming_ruby_1.9.pdf") > preview = stub('preview', :front_window => window) Perfect - so easy! Thanks. > If you have good high level specs with something like Cucumber or FitNesse, > this risk is diminished. You'll still have to change the example when

Re: [rspec-users] Stubbing through multiple layers

2010-01-09 Thread Matt Wynne
On 9 Jan 2010, at 12:02, David Chelimsky wrote: On Fri, Jan 8, 2010 at 9:37 PM, DeNigris Sean wrote: Hi list, I'm writing an example for a class that represents the "pickaxe" e- book, which I view in Preview.app: describe PickaxeBook do ... it "should tell whether it's ready to re

Re: [rspec-users] Stubbing through multiple layers

2010-01-09 Thread David Chelimsky
On Fri, Jan 8, 2010 at 9:37 PM, DeNigris Sean wrote: > Hi list, > > I'm writing an example for a class that represents the "pickaxe" e-book, > which I view in Preview.app: > > describe PickaxeBook do > ... >it "should tell whether it's ready to read" do >preview = stub('pr

[rspec-users] Stubbing through multiple layers

2010-01-08 Thread DeNigris Sean
Hi list, I'm writing an example for a class that represents the "pickaxe" e-book, which I view in Preview.app: describe PickaxeBook do ... it "should tell whether it's ready to read" do preview = stub('preview') preview.stub!(:**this is what I'm not su