Re: [rspec-users] stub in config.before

2011-08-15 Thread David Chelimsky
On Aug 14, 2011, at 10:31 PM, John Hinnegan wrote: > > On Sun, Aug 14, 2011 at 8:15 PM, Justin Ko wrote: > > > On Sun, Aug 14, 2011 at 3:48 PM, John Hinnegan > wrote: > > > I was trying to stub something "globally", across all tests today, and had > some trouble. > > I tried > > RSpec.

Re: [rspec-users] stub in config.before

2011-08-14 Thread John Hinnegan
the error I got was that .stub was not defined on the class from that block I can try to repro it outside of my current project later if you need actual failing code, but that's a representative snippet of what I tried On Sun, Aug 14, 2011 at 8:15 PM, Justin Ko wrote: > > > On Sun, Aug 14, 201

Re: [rspec-users] stub in config.before

2011-08-14 Thread John Hinnegan
Thanks, cheers On Sun, Aug 14, 2011 at 8:17 PM, David Chelimsky wrote: > On Aug 14, 2011, at 10:15 PM, Justin Ko wrote: > > On Sun, Aug 14, 2011 at 3:48 PM, John Hinnegan wrote: > >> >> >> I was trying to stub something "globally", across all tests today, and had >> some trouble. >> >> I tried >

Re: [rspec-users] stub in config.before

2011-08-14 Thread David Chelimsky
On Aug 14, 2011, at 10:15 PM, Justin Ko wrote: > On Sun, Aug 14, 2011 at 3:48 PM, John Hinnegan > wrote: > > > I was trying to stub something "globally", across all tests today, and had > some trouble. > > I tried > > RSpec.configure do |config| > config.before(:all) do > MyClass.st

Re: [rspec-users] stub in config.before

2011-08-14 Thread Justin Ko
On Sun, Aug 14, 2011 at 3:48 PM, John Hinnegan wrote: > > > I was trying to stub something "globally", across all tests today, and had > some trouble. > > I tried > > RSpec.configure do |config| > config.before(:all) do > MyClass.stub(:my_method) > end > end > > seems that stub is not avai

[rspec-users] stub in config.before

2011-08-14 Thread John Hinnegan
I was trying to stub something "globally", across all tests today, and had some trouble. I tried RSpec.configure do |config| config.before(:all) do MyClass.stub(:my_method) end end seems that stub is not available here yet. (I was stubbing a class method, and the class was loaded correc