Displaying 20 results from an estimated 1411 matches for "mocking".
Did you mean:
locking
2020 Aug 24
2
Mock config error
Hi Jonathan,
On Sun, 23 Aug 2020, Jonathan Billings wrote:
> On Aug 23, 2020, at 12:07, me at tdiehl.org wrote:
>>
>> ?Hi,
>>
>> I am trying to create a mock configuration file that points to my local dnf repo.
>> I have the following in the mock config template:
>>
>> [local-repo]
>> name=my-Local
>>
2006 Sep 01
3
Anyone seeing mock breakage after updating to 4.4?
Morning,
somehow the upgrade to 4.4 broke mock on my system:
| [angenenr at shutdown SPECS]$mock -r c3-i386 /home/angenenr/redhat/SRPMS/apache-ssl-2.8.28-2el4.src.rpm
| init
| clean
| prep
| This may take a while
| Could not find useradd in chroot, maybe the install failed?
Nope, it's not the
config_opts['chroot_setup_cmd'] = 'groupinstall build'
issue, as I'm still
2007 Aug 31
48
Deprecating the mocking framework?
I saw in one of Dave C.''s comments to a ticket that "our current plan
is to deprecate the mocking framework." I hadn''t heard anything about
that, but then again I haven''t paid super close attention to the list.
Are we planning on dumping the mock framework in favor of using Mocha
(or any other framework one might want to plug in?).
Pat
2008 Jul 25
21
Problems with mock assigned to a constant
Hi all,
Initially I thought this was a bug in the built-in mocking framework(and it
still may be), but I better hash it out on the mailing list before I
file/reopen the ticket:
http://rspec.lighthouseapp.com/projects/5645/tickets/478-mocks-on-constants#ticket-478-6
I thought my example illustrated my problem, but obviously I was passing the
wrong arguments to th...
2006 Oct 04
3
do we need stubbing?
Hey all -
The trunk currently supports three types of mocking/stubbing:
Mock Objects (created dynamically at runtime)
Partial Mocking of methods on existing classes
Stubbing of methods on existing objects or classes
The main difference between Partial Mocking and Stubbing is that Stubs
don''t verify.
I''m wondering if we really need the stu...
2007 May 02
4
Terse Mocks
Hello,
I recently made a feature request with a patch for terser mocks.
http://rubyforge.org/tracker/index.php?func=detail&aid=10412&group_id=1917&atid=7480
Here are some examples with their current equivalents:
the_mock.expects.foo(1,2) {|a, b| :bar}
the_mock.expects.foo(1,2).returns(:bar)
the_mock.expects(:foo).with(1,2) {|a, b| :bar}
the_mock.expects(:foo).with(1,2).returns(:bar)
2007 Jul 18
5
Mocking Rails association collections
Rails model association collections allow you to do nifty things like:
article.comments.find(:all, :conditions => {:created_at > 1.day.ago})
Has anyone found a good way to mock this up? I''m currently doing this:
@comment1 = mock_model(Comment)
comments = mock(Array)
comments.stub!(:find).and_return([@comment1])
@article = mock_model(Article)
2007 Mar 06
15
mocking missing methods
Hi folks.
So I''m using mocha on a ruby project, and I really like it. One thing
I''ve noticed is that it can be a bit "surprising" when I''m mocking
methods that don''t exist on an object, and I think there''s an easyish fix.
At the moment, you use sheep = mock() to create a mock sheep. What I''d
like to do is something like sheep = mock(Sheep), so the mock is typed.
It''s still duck-typed because the Sheep c...
2007 Nov 04
3
Returning the mock associated with an expectation.
I was reading through the FlexMock docs and noticed the expectation
method .mock, which returns the original mock associated with an
expectation.
It looks really handy for writing nice all-in-one mocks like:
mock_user = mock(''User'').expects(:first_name).returns(''Jonah'').mock
So I started playing around with mocha and found I could actually
already do this!
2007 Aug 14
4
Stubbing all methods
Mocha''s mock/stub framework has the ability to stub all methods on a
mock given. Does RSpec''s mocking framework have this ability? And
if not, is there some reason it shouldn''t be implemeneted?
Regards,
Scott
2020 Aug 23
2
Mock config error
Hi,
I am trying to create a mock configuration file that points to my local dnf repo.
I have the following in the mock config template:
[local-repo]
name=my-Local
baseurl=http://yumrepo.example.com/yum-repository/local/centos/8/x86_64/
failovermethod=priority
skip_if_unavailable=False
When I try to run mock I get the following error:
(vgeppetto3 pts18) $ mock -v -r epel-8-x86_64
2007 Apr 20
5
stubbing with and without a string
What is the difference between these two ways of mocking (with and
without the string):
mock(''Object'')
and
mock(Object)
?
Scott
2006 Oct 25
2
mock parameter problem
Here''s another one.
spec:
m = mock("blah")
m.should_receive(:foo).with(1)
code:
m.foo(2)
Failure message:
Mock ''blah'' expected ''foo'' once, but received it 0 times
------
Twice now I''ve gotten this failure message and wasted time trying to
understand why the method foo() was not being called despite all
evidence suggesting
2007 Oct 27
2
Strange warnings with view specs
I''ve been seeing the following in some of my view specs:
.P.P........ignoring attempt to close spec::mocks::mock:0x7334c4c
with td
opened at byte 258, line 20
closed at byte 287, line 20
attributes at open: {}
text around open: "\t</tr>\n\t<tr>\n\t\t<td>#<Spec::Mocks::Mock:0"
text around close:
2006 Sep 08
1
A quick guide to Mocha
Hello :)
Having just gone through the (admittedly simple) API of Mocha to learn
how it works, I wrote a quick guide (190 lines) to help others get up to
speed. I''ve attached it as RDOC and as HTML.
It is a first draft - please help me improve by giving feedback !
Contents :
Overview - Quick overview of Mocha
Unit testing, mock object and stubs - Very quick introduction to mock
2007 Feb 07
5
Mocking ActiveResource
I want to use ActiveResource in my app. Instead of hitting server
though, I want it to load from a file when I call find. Any clue how
I do that?
Pat
2007 Aug 28
3
How do you keep mocks updated without pain?
Hi!
I know you must be answering a lot of basic questions, sorry about that :-)
However I have not get it, how do you keep mocks updated without pain?
I reached to the point where mocking things for view. I spec
model-controller-view using "correct doc" way mocking-stubbing (plus I
should run integration test to be sure that everything really works
together).
Now, when I want to change something in model then basically I have to
change mocks so many places, haven''...
2007 May 30
4
Using mocks
I''ve just started doing TDD/BDD and like the idea of mocks. So I set
out to use them. The doc pages seem great, I setup the mock and then
it just works. Here is what I am trying to do:
Myuser is a non-rails model of user attributes. We are going to be
mocking the connection to the ldap server. The user class has a login
method that connects to the ldap server and if successful, returns the
user object. For now though, I''d be happy for it to return the true
value.
I''m writing this message cause it doesn''t work for me, but...
2006 Jul 24
2
Creating a ''default'' mock
Am I correct in thinking that it''s not currently possible to have a
method that creates a ''standard'' mock (i.e. a mock that has defaults
useful in all contexts)?
I''ve tried with the mock method and also by manually creating new Mock
instances. I get failures when setting up expectations (undefined
method ''receive'' for proc).
Chris
2020 Aug 25
1
Mock config error
On 25/08/20 11:27 am, Jonathan Billings wrote:
> On Aug 24, 2020, at 16:48, me at tdiehl.org wrote:
>>
>> Also, I am trying to add a dist tag to rpms that I build in mock.
>> In the epel-7 configs I do something like the following:
>> config_opts['macros']['%dist'] = '.el7.tnt' to get a dist tag on the
>> rpms. In epel/centos 8 this does not