Displaying 20 results from an estimated 100 matches similar to: "Mocha and rails 2.0.2?"
2008 Jan 28
9
Nested matchers
We''re encountering a failure with Mocha 0.5.6.
We had this expectation:
game_version.expects(:attributes=).with(:game_file =>
kind_of(GameFile), :game_id => @game.id)
This expectation was passing with 0.5.5, but fails with 0.5.6.
I added this test to parameter_matcher_acceptance_test.rb, which
passes in 0.5.5 and fails in 0.5.6
def test_should_match_nested_parameters
2008 Jun 12
2
Anyone using trunk?
Has anybody been using Mocha trunk over the last month or two?
I''ve done quite a bit of internal refactoring and wondered whether
anyone had any problems.
There are also a bunch of new features e.g. states, sequences, extra
parameter matchers & configurable warnings, but these are not
documented in the on-line rdoc.
I wondered if anyone has been looking at the rdoc in trunk and
2004 Aug 06
1
Icecast deadlock with 1.3.12 (fixed)
This is in CVS, FWIW (that is, not much since the odds of 1.3.13 being
released are epsilon close to nil).
On Wednesday, 02 July 2003 at 11:38, Ned Wolpert wrote:
> Folks,
> I email abit ago about using 1.3.12 in my environment, and fixing a
> dead-lock problem. Since 1.3.12 is 'obsolete', not supported, and GPL
> I'm provided a patch to the mailing list of my
2008 Apr 13
1
Incorrect @INC: Rcmd SHLIB error under Windows (2.6.2, 44383) (PR#11161)
Hi, R team.
I'm trying to build a dll from a c program to be invoked within R using
the .C() functionality.
Everything works like a charm on my Linux (Centos 5) (also 2.6.2) machines---
but under windows (Vista Ultimate) upon running (in either the windows 'Cmd'
command window or a Bash window) the command
Rcmd SHLIB myfun.c
I receive the error:
Can't locate R/Utils.pm in
2004 Aug 06
5
Icecast deadlock with 1.3.12 (fixed)
Folks-
First, let me submit a disclaimer... I know 1.3.12 is unsupported.
However, since icecast2 isn't officially released, I'm abit SOL anyways,
so I'm currently trying to debug it and will release a patch when I'm
done. (Which I'm doing since the code is GPL and I want to
contribute... if no one cares, let me know and I'll stop updating the
list with what i find)
2007 Apr 11
4
Feature request... I think...
Folks-
I just started using Mocha and I wanted to try something but I
couldn''t get it to work. I''m coming from the Java world, so my
approach may not be optimal for Ruby.
Say I''m testing a.do_something() which calls b.do_other_thing() twice,
but I really don''t want to change b.do_other_thing(), just ''expect'' it
to be called twice. I know I
2009 Jun 13
2
removing Mocha; 'spec spec' fails but the specific model file passes
I happened to mix ryan bates'' authentication scaffold with
rspec_scaffold on a demo project.
and ran into the problem of mixing mock frameworks...ryan uses mocha.
So, as a learning experience, I choose to redo ryan''s tests without
mocha but ran into a strange problem with tests of the User model.
With debugging you can see....
If you run just the user_spec.rb file, everything
2006 Feb 16
10
Confused over Model attrbutes and @ prefix
I''m confused about how attributes work in models. For example:
class Page < ActiveRecord::Base
attr_accessor :body
def foo
id # works
@id # won''t work IIRC
body # won''t work
@body #works
end
end
Why doesn''t everything work the same?
Joe
--
Posted via http://www.ruby-forum.com/.
2004 Aug 06
0
Icecast deadlock with 1.3.12 (fixed)
Folks,
I email abit ago about using 1.3.12 in my environment, and fixing a
dead-lock problem. Since 1.3.12 is 'obsolete', not supported, and GPL
I'm provided a patch to the mailing list of my changes to the the
src/soruce.c distributed file. (Its small but significant, as it allows
for transparent relays to work)
I need to use icecast 1 until icecast2 is a) released and b)
2008 Apr 14
0
Incorrect @INC: Rcmd SHLIB error under Windows (2.6.2, 44383) (PR#11165)
Has your environment variable path been set correctly?
It's been a while that I'm not using R under windows but remember had
experienced the same error. I remember that I had to put many paths as
environment variable to build R packages properly.
Best,
Mathieu
wolpert at stat.duke.edu a ?crit :
> Hi, R team.
>
> I'm trying to build a dll from a c program to be invoked
2008 Apr 14
0
(PR#11161) Incorrect @INC: Rcmd SHLIB error under Windows
The bug is yours: you are using Cygwin Perl, not a Windows Perl.
This is specifically warned about in the manual:
@strong{Beware}: you do need a @emph{Windows} port and not the Cygwin
one. Users of 64-bit Windows can use a Win64 Perl (such as that from
ActiveState) if they prefer.
You can't expect to use tools from a different operating system (Cygwin is
effectively a guest OS)
2007 Mar 30
7
problem with using any_instance
Hey all,
I have a question with using mocha in my tests.
In the same test file, I have two tests,
<code>
def test_a
klass.any_instance.stubs(:method_name).returns("something")
klass.new.method_name
...
end
def test_b
...
klass.new.method_name
...
end
</code>
where klass is some class
when the tests run, test _a passes, but test_b had an error like this:
2006 Dec 04
7
I need help to connect Postgres and Ruby on Rails Please.
Hello to everyone, I have a problem that is giving me a headache, and
trying to do a project in Ruby on Rails and I need to connect with a
Data Base that is en Postgres, the truth is that I didn’t think that it
was so hard to connect a DB with postgres because I was working with
Msyql and everything was easy. This are the thinks that I have install
in my computer.
1. Debian GNU/Linux, kernel
2007 Mar 18
5
Automatically mocking ActiveRecord methods
Seems like I do a fair amount of mocking ActiveRecord''s automatically
generated routines when I''m testing controllers. Things like:
@portalspace = PortalSpace.new :public_readable => true,
:public_writable => true, :name => ''public''
@portalspace.stubs(:id).returns(203)
PortalSpace.stubs(:find).with(203).returns(@portalspace)
2007 Apr 12
15
Preview of Latest Mocha Changes
I''ve finally managed to find some time to do some serious work on
Mocha. There are some code snippets on my blog
(http://blog.floehopper.org/articles/2007/04/12/preview-of-latest-mocha-changes)
showing the new functionality available in trunk (revision 128). I
don''t don''t know how many people out there are using trunk, but it
would be great to get some feedback on these
2006 Oct 09
7
multi_search problems, Never go away!
Hello, I am trying to use the multi_search method, but I keep getting
type error on nil objects, I send it [Model1,Model2] and it seems as
though the class names keep getting clobbered and turn to nil, somewhere
along the multi_index area. I tried to trace what was going on, but I
got nothing, also, this only happens when there are actually hits(thank
god, most of the time). Perhaps some insight?
2006 Nov 07
1
Memory consumption too high
Hi,
I''m having trouble with ferret and AAF blowing up with a NoMemoryError.
Sometimes when I add documents inside my rails app. Ferret starts
consuming huge amounts of memory. I''m on a machine with 2GB of memory
and it still runs out of memory. Sometimes I''m able to run
MyObject.rebuild_index and the memory doesn''t move up at all. However,
sometimes it
2007 Mar 21
2
store_class_name for Comatose:Page model
Hi,
I have three models: Comatose::Page, Article and Product.
In all of them, store_class_name is set to true.
Now, when i do:
results = Comatose::Page.multi_search("*", [Article,Product], options)
I get:
wrong constant name Comatose::Page
#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/class_methods.rb:438:in
`const_get''
2006 Nov 28
4
Update/Create record only if field is true
I have a sellable flag in my database. I''m trying to have ferret only
add/update records where sellable == true. What is the best way to do
this? I''ve tried editing instance_methods.rb in the AAF, but I still
can''t get it to work.
Thanks for the help
--
Posted via http://www.ruby-forum.com/.
2006 Oct 12
3
IO Error occured at <except.c>:79 in xraise (IOError)
Hi,
after a long indexing run I got the following error. I have 149 MB space
left on the disk, the index is 311 MB large; could Ferret have tried to
use more than that for the optimizing? Or would that have resulted in a
different error message?
/usr/local/ruby-1.8.5/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/runner.rb:27: