Displaying 20 results from an estimated 600 matches similar to: "only checking certain parameters for a method"
2007 Jun 21
2
expects with returns that returns the return value of the actual method
I''m trying to test some code that''s using active_merchant using the
following test. What I''d like to be able to do is verify that purchase is
called, however, rather than specifying the return value for purchase with
returns, I''d like it to return the actual return value provided if you
called the non mocked purchase method. Is this possible?
def test_charge
2007 Oct 25
4
Insure a method is called with no arguments.
We''ve been working with the ParameterMatchers (so cool!) but I don''t
see a way to insure a method is called with no arguments.
I imagined something like:
user = mock(''User'')
user.expects(:friends).with(nothing)
Anyone run into this?
2007 Sep 11
3
Expectations on portions of arguments called.
I''d like to create expectations on just portions of the arguments a
function takes.
For example, I want to verify that the a certain ActiveRecord
association extension adds an order clause to the find options hash.
Currently I simply check the entire argument structure, something like this
def test_referring_journals_should_order_by_citation_count
article =
2007 Sep 24
7
Parameter Matchers with optional params
Hi,
Are there any docs for combining parameter matchers, or some way to
define optional parameters? I''m trying to match something like:
.find( 42 ) || .find( 42, {:conditions=>nil,:includes=>nil} )
Or for that matter, 42 followed by nothing or anything... Halp? I''ve
tried different nested combos with any_of/all_of/anything, but
getting lost trying.
--Andrew
2020 Jul 08
1
samba-pdb-mysql, samba-pdbsql
Dar all,
recently I installed Samba and I found the documentation of Mr Jelmers
MySQL back-end
I found the source Packages on Sourceforge but I am not sure how to use
them, If I need to place this in the samba sources and recompile samba.
I was wondering if there are some compiled packages somewhere as I do
not have experience in compiling and do not have a test environment.
Maybe someone can
2006 Jan 18
3
Support for foreign keys in Migrations
Is there any work being done to add support for defining foreign keys in
ActiveRecord Migrations? If not is it something that people would find
useful or do most people here believe in the "Application Database" style
over the "Integration Database" style [1] as defined by Fowler?
I''d love to see support for foreign keys in Migrations. For selfish reasons
2006 Mar 05
9
Rails Development on a Mac Mini?
How many people out there are doing Rails development on a Mac Mini? I''ve
been eyeing up the MacBook as well as the new MacMini trying to decide if I
want to splurge. I''ve been doing very little Rails development thus far
which makes the investment a little hard to justify. The Free Mini Mac (
http://minimacs.freepay.com/?r=16778073) offer seems like the best route but
2007 Jun 12
3
rspec 1.0.x and liquid?
Is anyone else using liquid with the > 1 rspec? This seems to fail:
it ''should render show'' do
response.should render_template(''buyers/show'')
get :show, :id => 1
end
with an error like
1)
NoMethodError in ''/buyer GET should render show''
You have a nil object when you didn''t expect it!
The error occurred
2012 Jan 11
0
ices2 memory leak on Debian/ARM (The Darkener)
ARM, default install on an Ionics Stratus plug computer -
http://www.ionicsplug.com/stratus.html ) - running Current Debian Stable.
- Jordan
On 01/10/2012 03:13 PM, Christian Eichert [K9] wrote:
> Can you describe your architecture?
> --
> Christian Eichert
>
> ------------------------------------------------------------------------
> *Von:* TheDarkener <thedarkener at
2006 Apr 27
6
Functional Test Problem. Nubee, please help
ALl my controllers require the user to be logged in. SO they will be
redirected to my "login" controller.
How do i login first in a functional test? Im assuming i use the setup
method to login the controller.
This is the setup method for the Activities controller functional test:
def setup
@controller = ActivitiesController.new
@request =
2012 Jan 10
3
ices2 memory leak on Debian/ARM (The Darkener)
Hi Keith,
As I explained before, Valgrind won't run in my arch. I'll Google for
some other memory leak detection tools, however. Thank you for your
input...I look forward to helping fix this bug!
- Jordan
On 01/10/2012 07:43 AM, Keith Roberts wrote:
> *snip*
> There's a Linux memory profiler called:
>
> "Valgrind" is a multipurpose code profiling and memory
2009 Oct 31
1
Long pause during dialing to IVR
To insert long pause during dialing and submitting multiple DTMF tones, is there better solution then below:
exten => _51,1,Dial(SIP/18778794590 at pstn-5665,300,D(wwwwwwwwwww1www),D(wwwwwwww005893884053811#))
I think submitting multiple DTMF tones is not allow from one command line. The first part D(wwwwwwwwwww1www) worked, but not the second one
D(wwwwwwww005893884053811#)
I'm trying
2010 Apr 27
4
Icecast Server doesnt work.
I am very new on this list, so that I will first say hello to everybody.
I been this morning on the IRC and some guy there explained me that if I
want real help I must pay him 60 euros pe hour.
I hope you dont charge me 60 euros for readiung this email and giving a
hint.
I have tryed to install icecast2 and ices2 on my dedicated server and
followed allthe steps described on your site.
in the end
2006 Dec 31
2
what''s with the response.should_be_xxxx stacktrace?
If I do
get :index
response.should_be_success
I get about 20k of marshalled dumpage that starts like
#<ActionController::TestResponse:0x390443c @body=\"<html><body>You
are being <a href=\"http://test.host/carts/1\">redirected</a>.</body></html>\",
@assigns=[], @redirected_to={:action=>\"show\", :id=>1},
2006 Feb 03
2
testing to see if emails are sent out on exceptions
Hi,
I''m using ActionController::rescue_action_in_public() to send emails
when uncaught exceptions happen.
Is it possible to write tests for that?
Joe
2007 May 26
11
RSpec
Hi RSpec Mailing list,
I''m new to RSpec and I am trying to get it running with the caboo.se sample
rails app.
I installed the current version of rspec with rspec_on_rails
I tried to run rake spec but received:
330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec
(in /Users/multimedia/Desktop/restful_auth_rspec)
2006 Feb 02
6
How do I? Same Model, Different Controllers, Different Validations?
Hi all --
The simple question is: How do I set different validations for the same
Model, when accessed in different Controllers?
Here''s the scenario: I have a store/cart app, with a customer-facing
shopping cart, and a typical Admin side. The Admin side also has an
Order Entry component, where our staff can enter orders received by fax,
telephone, etc. Both the customer-facing cart
2007 Nov 09
26
RSpec on Rails 2.0
I have a project on edge rails that I''m trying to convert from Test:Unit
to rspec. I have the rspec gem version 2338, the rspec and
rsepc_on_rails version 2831 in vendor/plugins, and rails version 8117 in
vendor/rails.
I''ve been able to get a few specs passing, have gotten the specs running
from autotest, and am able to do "rake spec:doc" and get the basic
command
2006 Jul 02
5
"the number of parameters does not match the number of substitutions" error
All of a sudden, I''m getting this error:
1) Error:
test_index(AccountControllerTest):
RuntimeError: The number of parameters does not match the number of
substitutions.
/home/joe/projects/tanga/trunk/config/../vendor/rails/actionpack/lib/action_controller/assertions.rb:92:in
`assert_redirected_to''
2007 Jun 30
8
attachment_fu not working on Textdrive
I have attachment_fu working on my local Windows machine (localhost:
3000)
But when I transfer it to Textdrive (Solaris), it doesn''t work. Any
ideas?
Give it a shot: http://haloresearch.textdriven.com:8217/raw_data_files/new
I haven''t got the logger working yet on TextDrive, but that will be my
next step. Any suggestion on what things to look at first?
Chirag