Displaying 20 results from an estimated 10000 matches similar to: "Object equality with a DSL"
2007 Aug 06
1
Stubbing Enumerable#each
I have a mock of an instance of a class which descends from Array:
class ArrayDescendent < Array; end
#... in the specs...
@descendent = mock ArrayDescendent
How would I stub out ArrayDescendent#each, which is inherited from
Array, to return multiple values successively? I could use
and_yield, but that is raising an arity error (the anonymous function/
block should expect only *one
2006 May 19
2
Problems at running Rails at the first time
Well, i got familiar with writing Ruby scripts the last days and thougt to
write a web application with a framework. First steps was Rails.
I successfully installed Gems, Action Web Service and Rails, at least the
installer said so... :D
So I took a tutorial to write a small app, but I fail in the step startig
Rails with the command "rails myappdir". There are some warnings and error
2007 Nov 26
0
rSpec (rev 2996), Rails (rev 8214): TextMate bundle problems
Hey guys,
I''m trying to get rSpec (rev 2996) working with Rails 2 (rev 8214).
Running the tests from the command line works, no problem.
I installed the RSpec.tmbundle (also rev 2996), and would like to see
the HTML test results in TextMate. When I run the "Run examples in
selected files/directories" command in TextMate, I get the following
dump:
2007 Aug 06
5
using RSpec''s trunk in non-rails projects w/ Autotest
I believe for rails projects you can put rspec''s code repos into
vendor/plugins, and autotest will automatically use the rspec binary
in that directory, and not the gem installed.
Is there an easy way to do this for non-rails projects? There are a
few advancements on trunk which I would like to take advantage of.
Tips welcome ; ).
Scott Taylor
2007 Mar 19
3
controller_name with dynamic controllers
I''m writing a controller which should only be inherited from,
something like the generic crud controller seen here: http://
geekonomics.blogspot.com/2006/07/crud-and-shared-controllers.html
Now, in my spec, I would like to create a controller which inherits
from the generic CRUDController, without actually creating the
controller. This controller is *only* for testing.
How can I
1999 Jan 17
0
request_oplock_break - a clue - what does it mean ?
Hi all,
I increased the log level, and found something very interesting out.
I know now what causes a sbmd to go into infinite hibernation on
Solaris. I do not know why, it is probably something Solaris specific,
I thought that a "dont descend" would have resolved my problem, but
it has not. details at the end.
Scenerio:
solaris 2.5.1 running samba 2.0.0 (happens w/ several if not
2007 Apr 13
0
ANN 0.9-beta-2
I''ve just made a new beta release available that fixes some more bugs
to the translator.
http://www.nabble.com/ANN:-RSpec-0.9.0-beta-1-available-for-download.-t3526973.html
Additional changes since 0.9 beta-1:
* Made Spec::Ui *much* easier to install. It will be released
separately. Check out trunk/spec_ui/examples
* HTML reports now include a syntax highlighted snippet of the source
2007 Mar 24
0
Using spec fixtures with integration tests
Hi all,
How can I use spec fixtures with rails integration tests ?
I''ve tried adding {{ fixtures "../../spec/fixtures/myfixture" }}
to the integration test but the fixtures are not loaded when I run the
rake task.
Rails doesn''t load symlinked fixtures either so I copied the files from
spec/fixtures for the time being. Not very DRY.
Any ideas ?
Keith
2007 Mar 19
4
spec.opts: questions about formatters, etc.
Questions concerning spec.opts:
1. Am I correct in believing that each option should go on a
separate line of spec.opts in the rails spec directory? If this is
so, why is it so?
2. Using a formatter in spec.opts doesn''t seem to work. Here is my
spec.opts file:
--colour
-f s
and this is what happens when I run the rake task:
Couldn''t find formatter class s
Make
2008 Feb 02
0
Adding methods to Object in Rails -- WARNING
I wanted to do:
foo.wrap
and wrap would go to a specialized wrap for some types of foo and a
general Object#wrap for all the others.
So I added wrap to Object
class Object
def wrap
self
end
end
This worked except for objects which are actually AssociationProxy
objects pretending to be some other object. The reason is that
AssociationProxy removes all but a few methods from itself.
2007 Jun 21
9
it_should_behave_like
I''m trying to use it_should_behave_like, and something seems to be wonky
with the syntax. When I add :shared=>true, the DSL complains that the next
line is the fixture declaration:
/vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb:137:in
`method_missing'': undefined method `fixtures'' for
#<Spec::DSL::EvalModule:0x324a2cc> (NoMethodError)
Here''s the
2007 Aug 15
8
Extra Options to Heckle
I''ve tried running Heckle with rspec on some of my classes, but keep
getting (what I believe to be) an infinite recursion. Is there some
way to supply extra options to heckle via. rspec?
Scott
2013 May 02
1
Package survey: singularities in linear regression models
Hello,
I want to specify a linear regression model in which the metric outcome
is predicted by two factors and their interaction. glm() computes
effects for each factor level and the levels of the interaction. In the
case of singularities glm() displays "NA" for the corresponding
coefficients. However, svyglm() aborts with an error message. Is there a
possibility that svyglm()
2006 Jan 03
2
Newbie Install Question
Hi,
I''ve been trying to get rails going on one of our dedicated servers,
with no luck. I have ruby installed, gems, etc... When i goto to
create my first rails app i get this:
rails test
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/
associations/association_proxy.rb:6: warning: instance_methods:
parameter will default to ''true'' as of 1.8.1
2007 Nov 29
4
Rollbacks, Sqlite3 bug. Has this been reintroduced ?
Hey,
I just updated from the edge and it looks like this _issue_ has resurfaced.
Yesterday things were working (stories and specs).
No code base changes, only rspec and rspec_on_rails
After updating today I now need to set <config.txn...fixtures> to false in
the spec_helper.rb
to get the specs running, the stories are fine. Looks like the fixture
loading is trying to start a txn.
I
2007 Oct 04
16
Spec/Test Speed
Just wanted to pick some smart people about this topic: What are you
guys doing to increase the speed of your specs?
I''m a big fan of autotest, but right now my current project has 438
specs (for rails). Most of them are in the model, and for all of
them we are hitting the database (they are more functional specs than
unit-tests). The whole suite takes 112 seconds (meaning the
2016 May 11
2
[Openmp-dev] [cfe-dev] RFC: Proposing an LLVM subproject for parallelism runtime and support libraries
2007 Apr 16
0
Fwd: ANN: FlexMock 0.6.0 Released
FYI - Jim Weirich just released an rspec-compatible version of
FlexMock. For those of you using trunk, you can now use either
FlexMock, Mocha, or RSpec''s built-in mocking framework by saying:
Spec::Runner.configure do |config|
config.mock_with :flexmock # or :mocha or :rspec (default)
end
The choice is yours. Mock in peace.
Cheers,
David
---------- Forwarded message ----------
From:
2007 Feb 24
3
Spec failing [Possible Bug with kind_of? and instance_of?]
I have a spec which is failing, but I just can''t say why. Maybe I''m
missing something painfully obvious?
Here is the pastie of the results & the spec:
http://pastie.caboo.se/42626
The spec to look for is "should have an array of users" I''ve printed
out ("puts''ed") to the terminal the fact that the values are
*opposite* to what
2007 Feb 26
15
drbspec - "no server running"
At times I''ve gotten the message "No Server Running" from drbspec
with my rails app. The thing is, the drb server certainly is running!
This happened a few times with my model specs. I''m not sure exactly
what the problem was there - I believe I was loading up fixtures that
didn''t exist. I was calling fixtures :singular_table_name as opposed
to