similar to: Cherry-picking mocks?!

Displaying 20 results from an estimated 1000 matches similar to: "Cherry-picking mocks?!"

2007 Aug 14
12
expect_render, why does there need to be a warning
There is a warning on the web site about expect_render and stub_render: "WARNING: expect_render and stub_render, while very useful, act differently from standard Message Expectations (a.k.a. mock expectations), which would never pass calls through to the real object. This can be very confusing when there are failures if you''re not aware of this fact, because some calls will be
2007 Jun 27
3
template.expect_render
Trunksters, I just added a couple of methods to ActionView::Base in Spec::Rails (as of r2136) that lets you do this in view examples: describe ''/things/index.html.erb'' do it "should render _thing with a collection of things" do assigns[:things] = things = [Object.new] template.expect_render(:partial => ''thing'', :collection => things)
2008 Jan 23
4
expect_render(...).and_return(''x'')
Hi, I''m trying to spec a controller method which renders some rjs as part of a render :update block. The problem I''m having is that stub_render or expect_render don''t seem to allow and_return to work. The controller method does: if @thing.save render :update do |page| page.insert_html :bottom,
2008 May 03
4
silly partial qu
hi all, i''m just trying to check a partial has been rendered, by using: response.template.should_receive(:render).with(:partial => "tasks/list") this passes, even if I put something bogus in the partial name, such as: response.template.should_receive(:render).with(:partial => "___tassdfsdfks/list") does anyone know why this doesn''t fail? is this the
2013 Dec 10
1
[LLVMdev] Please cherry pick r195411 into release-3.4
Hi Michael, Can you please cherry pick r195411 into release-3.4 to fix building on older OS X? Thanks, Jeremy commit e323506316cc3948bd801be537a723c308d8e2d4 Author: Michael Gottesman <mgottesman at apple.com> Date: Fri Nov 22 05:00:51 2013 +0000 [block-freq] Update data in test case to be unsigned long long to fix mingw build. git-svn-id:
2016 Jan 19
0
Recommendation for cherry-pick between 3.12 and 4.2: 0a363e85cdaf
On Tue, Jan 19, 2016 at 5:22 AM, Jiri Slaby <jslaby at suse.cz> wrote: > Hi, > > On 01/17/2016, 08:28 PM, Ilia Mirkin wrote: >> I'd like to recommend backporting this commit: >> >> commit 0a363e85cdafbceeee6a49b91c604d0d4d070dc7 >> Author: Hans de Goede <hdegoede at redhat.com> >> Date: Thu Jul 23 17:20:12 2015 +0200 >> >>
2016 Mar 01
0
Recommendation for cherry-pick between 3.12 and 4.2: 0a363e85cdaf
On Sun, Jan 17, 2016 at 02:28:13PM -0500, Ilia Mirkin wrote: > Hello, > > I'd like to recommend backporting this commit: > > commit 0a363e85cdafbceeee6a49b91c604d0d4d070dc7 > Author: Hans de Goede <hdegoede at redhat.com> > Date: Thu Jul 23 17:20:12 2015 +0200 > > drm/nouveau/nv46: Change mc subdev oclass from nv44 to nv4c It doesn't apply to
2016 Jan 19
2
Recommendation for cherry-pick between 3.12 and 4.2: 0a363e85cdaf
Hi, On 01/17/2016, 08:28 PM, Ilia Mirkin wrote: > I'd like to recommend backporting this commit: > > commit 0a363e85cdafbceeee6a49b91c604d0d4d070dc7 > Author: Hans de Goede <hdegoede at redhat.com> > Date: Thu Jul 23 17:20:12 2015 +0200 > > drm/nouveau/nv46: Change mc subdev oclass from nv44 to nv4c > > This disables MSI by default on G72 (NV46)
2023 Mar 07
2
Bug#1032480: xen: Important cherry-picks for bookworm/updates
Package: src:xen Version: 4.17.0+46-gaaf74a532c-1 Severity: important Two major bugs have shown with the release of new hardware from AMD. Since the new hardware is likely to become common during the life of Debian/bookworm, you may wish to grab them early: ad15a0a8ca2515d8ac58edfc0bc1d3719219cb77 x86/time: prevent overflow with high frequency TSCs Turns out the latest generation is fast enough
2016 Jan 17
5
Recommendation for cherry-pick between 3.12 and 4.2: 0a363e85cdaf
Hello, I'd like to recommend backporting this commit: commit 0a363e85cdafbceeee6a49b91c604d0d4d070dc7 Author: Hans de Goede <hdegoede at redhat.com> Date: Thu Jul 23 17:20:12 2015 +0200 drm/nouveau/nv46: Change mc subdev oclass from nv44 to nv4c This disables MSI by default on G72 (NV46) devices where it's apparently a bit buggy. We have a later patch which turns MSI back
2009 Mar 15
0
rspec-rails 1.2.0 Released
rspec-rails version 1.2.0 has been released! * <http://rspec.info/> * <http://wiki.github.com/dchelimsky/rspec> * <http://wiki.github.com/dchelimsky/rspec/rails> * <http://wiki.github.com/dchelimsky/rspec/upgrades> Behaviour Driven Development for Ruby on Rails. Changes: ### Version 1.2.0 IMPORTANT INFORMATION: Due to changes in Rails-2.3, there are some changes in
2007 Oct 20
14
Problems with form_for and partials
i''m having problem with a form_for situation where i''m trying to DRY out the repeated parts of my forms and put them in common/form and render the form elements via another partial in controller_name/_form. Here''s the first form # app/views/common/form <% form_for ... do |f| -%> <%= render :partial => "params[:controller]/form", :object => f
2007 Nov 20
3
How to test views with Nested Resources and Partials
Hi everyone, I am relatively new to rspec and I am running into a wall in testing my views. I have a RESTful resource Contracts with a nested resource of Line_items. I am trying to figure out how to test the "edit" form of the Line_items. What complicates this is the nested routing and how to account for it, and that there is a partial form (_form.haml) that both the edit.haml and
2014 May 20
14
[PATCH 00/12] Cherry-pick nv50/nvc0 patches from gallium-nine
I went through the gallium-nine tree and picked out nouveau patches that are general bug-fixes. The first bunch I'd like to also get into 10.2. I've reviewed all of them and they make sense to me, but sending them out for public review as well in case there are any objections. Unless I hear objections, I'd like to push this by Friday. Christoph Bumiller (11): nv50,nvc0: always pull
2007 Aug 13
8
How to use expect_render?
Hi: I am a rspec beginner. I have scratched my head for the whole afternoon, trying to figure out a way of writing render expectation in controller spec. However, I failed. It kept telling me that the ''expect_render'' was an undefined method. I have installed rspec 1.0.8 and rspec_on_rails as well. Below is the controller to be tested. Controller def index pre
2007 Jul 14
3
expect_render twice in views
I found this: controller.expect_render(:partial => ''thing'', :collection => things).once but I am trying to expect_render twice in my view spec: template.expect_render(:partial => ''order_details'').twice This doesn''t work as the template.expect_render call seems to be returning an array. Is it possible to expect the rendering of a partial
2008 Jan 10
4
Mocking and stubbing Rails'' association extensions
I''m having a lot of trouble stubbing out an association extension for some view tests. Example rails code modeling a music album: class Album < ActiveRecord::Base has_many :songs do def streamable find(:all, :conditions => ''streamable = 1'') end end end So for a given Album instance (say @album), I need to be able to stub both
2007 Sep 14
5
controller.expect_render has me beat!
Hi, A controller has a method with the following def update ... if @config.update_attributes( params[:new_config] ) redirect_to :action => :index else * render :action => :edit, :id => params[:id] # this line here* end ... end The example has the following it ''should render the "edit" config url on an unsuccessful save''
2008 Mar 12
2
RSpec view test for :partial with :locals?
I''m currently working on some RSpec view tests and I''m having problems with expect_render. Most of the expect_render''s work fine, but in one of my views I have: <%= render :partial => "user_cloud", :locals => {:user => @featured_user} %> I see that expect_render supports ":object" or ":collection" for the second
2008 Aug 08
2
template.expect_render fails when partial is rendered from a helper
My spec; describe ''subnav rendering while logged in'' do before do template.stub!(:logged_in?).and_return(true) template.stub! (:current_profile).at_least(:once).and_return(mock_profile) end def do_render render "/homepages/show.html.erb" end it "should render the logged in partial for homepages" do