Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-22 Thread David Chelimsky
On Jun 22, 2010, at 9:58 AM, Michael Schuerig wrote: > On Tuesday 22 June 2010, David Chelimsky wrote: >> On Jun 22, 2010, at 8:27 AM, Michael Schuerig wrote: > >>> #_view (and #view in turn) creates just one ActionView::Base >>> instance the first time it is called. That's as it is intended. >>

Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-22 Thread Michael Schuerig
On Tuesday 22 June 2010, David Chelimsky wrote: > On Jun 22, 2010, at 10:06 AM, David Chelimsky wrote: > > On Jun 22, 2010, at 9:58 AM, Michael Schuerig wrote: > >>> Stubs and assigns are unrelated, so even though this might be a > >>> bug, I don't think it's the cause of what you're seeing. > >>

Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-22 Thread David Chelimsky
On Jun 22, 2010, at 10:06 AM, David Chelimsky wrote: > > On Jun 22, 2010, at 9:58 AM, Michael Schuerig wrote: > >> On Tuesday 22 June 2010, David Chelimsky wrote: >>> On Jun 22, 2010, at 8:27 AM, Michael Schuerig wrote: >> #_view (and #view in turn) creates just one ActionView::Base i

Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-22 Thread Michael Schuerig
On Tuesday 22 June 2010, David Chelimsky wrote: > On Jun 22, 2010, at 8:27 AM, Michael Schuerig wrote: > > #_view (and #view in turn) creates just one ActionView::Base > > instance the first time it is called. That's as it is intended. > > The effect is, however, that only assigns up to that point

Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-22 Thread David Chelimsky
On Jun 22, 2010, at 8:27 AM, Michael Schuerig wrote: > On Sunday 20 June 2010, Michael Schuerig wrote: >> Are partial mocks supposed to work in rails-rspec 2.0.0.beta.12? >> >> I'm trying to do things like >> >> view.stub(:current_user).and_return(@user) >> view.stub(:current_page?).and_return

Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-22 Thread Michael Schuerig
On Sunday 20 June 2010, Michael Schuerig wrote: > Are partial mocks supposed to work in rails-rspec 2.0.0.beta.12? > > I'm trying to do things like > > view.stub(:current_user).and_return(@user) > view.stub(:current_page?).and_return(false) > > However, when I do that, the view uses its "ord

Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-20 Thread Michael Schuerig
On Monday 21 June 2010, David Chelimsky wrote: > On Jun 20, 2010, at 5:18 PM, Michael Schuerig wrote: > > # in spec/spec_helpers.rb > > > > config.include PartialHelpers, :example_group => { > > > >:description => lambda { |description| > >: > > # FIXME this is a kludge as there is

Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-20 Thread David Chelimsky
On Jun 20, 2010, at 5:18 PM, Michael Schuerig wrote: > > # in spec/spec_helpers.rb > config.include PartialHelpers, :example_group => { >:description => lambda { |description| > # FIXME this is a kludge as there is > # currently (rspec 2.0.0.beta.12) > # apparently no other way

Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-20 Thread Michael Schuerig
On Sunday 20 June 2010, David Chelimsky wrote: > On Jun 20, 2010, at 3:19 PM, Michael Schuerig wrote: > > Are partial mocks supposed to work in rails-rspec 2.0.0.beta.12? > > > > I'm trying to do things like > > > > view.stub(:current_user).and_return(@user) > > view.stub(:current_page?).and_re

Re: [rspec-users] RSpec 2 view specs: partial mocks

2010-06-20 Thread David Chelimsky
On Jun 20, 2010, at 3:19 PM, Michael Schuerig wrote: > Are partial mocks supposed to work in rails-rspec 2.0.0.beta.12? > > I'm trying to do things like > > view.stub(:current_user).and_return(@user) > view.stub(:current_page?).and_return(false) > > However, when I do that, the view uses its