similar to: weird behavior of mocking ruby class methods

Displaying 20 results from an estimated 900 matches similar to: "weird behavior of mocking ruby class methods"

2004 Sep 10
0
Ogg FLAC
Hi, > sorry about that... it sounds like a good idea but I don't > know what the right metric would be (bytes written, sample > number, etc). I was going to forward this to vorbis-dev > but haven't yet. If you see the whole thing from a perspective of a filter graph, like DirectShow or GStreamer, the number of bytes written so far is the best solution. The graph for playing
2004 Sep 10
1
Ogg FLAC and granulepos
--- Ingo Ralf Blum <ingoralfblum@gmx.de> wrote: > Hi, > > > sorry about that... it sounds like a good idea but I don't > > know what the right metric would be (bytes written, sample > > number, etc). I was going to forward this to vorbis-dev > > but haven't yet. > > If you see the whole thing from a perspective of a filter graph, like >
2006 Oct 04
0
stubbing/partial mocking
All, Brian Takita has been contributing to a stubs branch to support stubbing and partial mocking on Modules (and therefore classes). I tweaked the syntax a bit and merged it into the trunk, so you can update from the trunk and check out the new stubbing/mocking love. If you prefer to wait for a release, there should be one coming soon-ish (I''m aiming for later this week). As Brian
2007 Jan 08
0
mocking/stubbing ferret
Does anyone have an experience with mocking/stubbing ferret, in order to increase speed? I''ve taken a look at what it might entail and from what I''ve seen it would have to be a pretty elaborate system. But I am not very experienced with mocking/stubbing. Any tips much appreciated. John
2007 May 27
2
Mocking Requests
Hi Guys! I just joined this list after James helped me out in ruby-talk to mock a http get request for a project I have running :) Now comes the second question... I was fiddling around, making the mocking with the get request work (which turned out to me pretty easy), but then I ran into another problem. I was faced with mocking the post request, so I thought I could do it the same way
2008 Jun 01
0
Mixing mocking frameworks?
First, it was great meeting a bunch of you at RailsConf. Recently I''ve run into a problem using RSpec, namely its support for multiple mocking frameworks. Wait you say, isn''t that a good thing? Yes, it is until you end up mixing frameworks. I was writing my latest app, and I choose to get the app working and then add in the authentication system. So I went and wrote all
2010 Aug 29
0
Troll - A Rails plugin for making webservice mocking easier
Hi Folks, Troll trumps your existing ActiveResource mocking libraries like inbuilt HttpMock,Fakeweb or Webmock out of water. With Troll, ActiveResource mocking just works, some of its features: 1. Don''t need to mock calls at Net::HTTP level (which webmock,fakeweb do). Really, we don''t care what HTTP library ActiveResource uses, fakeweb and webmock bring additional complexity
2007 Oct 25
1
Mocking/Stubbing help with subdomain as account key
My app uses account_location to set up subdomains as account keys. In my controllers, all my model operations are scoped through the @current_person object. The question is: How do I test this with RSpec''s mocking and stubbing? Basically, I need to test that @current_person.things is getting the find message and returning @thing. I''ve tried stubbing and mocking
2012 Oct 12
9
[PATCH] Fits: tool to parse stream
Simple tool to parse a fits-stream from stdout. Signed-off-by: Arne Jansen <sensille@gmx.net> --- The idea of the btrfs send stream format was to generate it in a way that it is easy to receive on different platforms. Thus the proposed name FITS, for Filesystem Incremental Backup Stream. We should also build the tools to receive the stream on different platforms. As a place to collect
2008 Jan 11
2
guide to good mocking?
Hi all - does anyone know of a good blog post or wiki or something with a good guide to mocking? I''ve got some degree of responsibility for people who are creating mocks. I''m supposed to actually be telling them the best way to do it. In some cases we have code with like a bazillion mock(:x) statements and it''s kind of out of control. I have an idea how the specs should
2007 Mar 27
2
mocking/stubbing newbie questions
I''m new to mocking and stubbing. Can someone help me out with the following? I don''t exactly know why this spec is failing: describe "GET /users/1/terms" do controller_name :terms setup do @user = mock_model(User) User.stub!(:find).and_return(@user) end def do_get get :index, :user_id => 1 end it "should find all terms
2007 Apr 06
3
Mocking Authentication
Is anyone using Restful Authentication? If so, how are you mocking the login for your controllers? I''m having trouble with it and would love an example of someone''s login. I''m sure I''m missing something simple. Michael railsconsulting.com
2007 Jul 16
4
RSpec - concerns about mocking
I''m getting into RSpec more after getting the awesome Peepcode screencast about it. So far I love it, but coming form Test::Unit with Rails, I have some concerns about the recommendation to mock models and database calls in controller and view specs. Lets say you have a method on your User model called User.find_activated, and you have models specs for it. Then in your controller specs
2010 Apr 14
1
Cannot connect matroska splitter to theora encoder
Hi everyone, I face a problem trying to encode a mkv file into theora using directshow filters I have a mkv file containing only video encoded in YUY2. I use the DirectShowNet Lib V2.1 ( <http://sourceforge.net/projects/directshownet/files/> http://sourceforge.net/projects/directshownet/files/) I use the matroska splitter directshow filter v1.0.2.9 (
2007 Jul 24
2
Mocking Resolv::DNS?
Hello Rspecers, I have a rails project where I am calling Resolv::DNS.open and then using the block to check a domain name. The code snippet in question is: domain = "mytest.com" Resolv::DNS.open do |dns| @mx = dns.getresources(domain, Resolv::DNS::Resource::IN::MX) end I obviously want to stub this out, especially for speed but can''t quite work out how. I
2007 Aug 21
7
mocking singletons
How can I safely mock a singleton without the mocked method living on outside the scope of the test method? I''ve run into this problem with mocking methods on globals (gasp!) in the past by doing something like def mock_my_global original = $my_global $my_global.expects(:foo).returns(''bar'') yield $my_global = original end Is there something similar I
2016 Oct 28
3
Samba and BTRFS server-side copy
On Thu, Oct 27, 2016 at 05:22:14PM -0700, Jeremy Allison via samba wrote: > > Looking around inside that source code I also see: > > do_read (GVfsBackend *backend, > GVfsJobRead *job, > GVfsBackendHandle handle, > char *buffer, > gsize bytes_requested) > { > GVfsBackendSmb *op_backend = G_VFS_BACKEND_SMB (backend); >
2008 Mar 18
6
Problem with mocking a simple has_many relationship
Hi there all. Sorry if the question sounds silly but i''m rather new at the ''mocking'' stuff... So here is my problem (code helps more than talking): the model: class Item < ActiveRecord::Base ... has_many :images, :dependent => :destroy ... protected def validate errors.add(:images, "cannot be empty") if self.images.count end end the
2016 Aug 01
1
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
On Sat, Jul 30, 2016 at 05:57:02PM +0900, Namhyung Kim wrote: > On Thu, Jul 28, 2016 at 02:22:39PM +0100, Daniel P. Berrange wrote: > > > +static void virtio_pstore_from_filename(VirtIOPstore *s, char *name, > > > + char *buf, size_t sz, > > > + struct virtio_pstore_fileinfo *info) > >
2016 Aug 01
1
[Qemu-devel] [PATCH 6/7] qemu: Implement virtio-pstore device
On Sat, Jul 30, 2016 at 05:57:02PM +0900, Namhyung Kim wrote: > On Thu, Jul 28, 2016 at 02:22:39PM +0100, Daniel P. Berrange wrote: > > > +static void virtio_pstore_from_filename(VirtIOPstore *s, char *name, > > > + char *buf, size_t sz, > > > + struct virtio_pstore_fileinfo *info) > >