Displaying 20 results from an estimated 1000 matches similar to: "reby-debug and rspec"
2008 Jan 11
5
Missing methods
We have a custom implementation of the Mother Object idea. It''s inside
of a module, basically like this:
module Factory
%w(account friendship person invitation message asset email_address
birth).each do |klass|
eval <<-EOF
def self.create_#{klass}(attributes = {})
default_attributes = valid_#{klass}_attributes
#{klass.camelize}.create!
2008 Feb 19
3
render_to_string in a controller test?
Hi all,
I know that in general, view and controller tests should be isolated,
such that controller specs don''t test views etc. However, I think
I''ve run into a situation that might be an exception.
My controller uses render_to_string to produce a chunk of HTML that it
passes to a model to be processed.
The controller then redirects the user to a different page. The
2008 Jan 31
1
RSpec and the Basecamp API
I realise that this is kind of a basic question but I''m new to rspec and
still trying to work out how to do things. I''m working on a rails project
that requires basecamp integration via the api, which is fairly trivial to
use via the basecamp.rb wrapper:
Connection:
basecamp = Basecamp.new(APP_CONFIG[''api_host''], APP_CONFIG[''api_username''],
2008 Jan 27
8
Textmate RSpec Bundle ''it'' snippet
It seems to me that the RSpec bundle''s ''it'' snippet is in need of some
love. By default, a newly inserted spec passes. This seems odd as it
is misleading. It also makes it harder find what specs still need to
be completed if you return to an RSpec module after a break.
I propose that the ''it'' snippet is changed to the following:
it
2008 Mar 08
10
rspec groups?
One of the things I really liked about TestNG was the grouping
feature. Are there any plans for rSpec to incorporate that? Is there
any way to emulate that functionality in rspec?
Will.
2007 Jun 12
8
rdebug spec ?
Can you run rdebug on specs?
I get errors when I try:
$ rdebug spec ./spec/models/select_option_spec.rb
./spec: Is a directory - ./spec (Errno::EISDIR)
from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/bin/
rdebug:136:in `debug_load''
from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.9.3/bin/
rdebug:136
from /opt/local/bin/rdebug:16:in `load''
2007 Jan 18
4
problems testing a rails controller
I''m trying to test a rails controller, but my mock
isn''t working. Everything looks right to me. Can
someone take a look at it and see if I''m missing
something obvious
http://pastie.caboo.se/33883
Domain.should_receive(:find_domain).once.and_return(domain)
That line in the spec is failing but I don''t see why.
If I comment out that line the test passes so it is
2008 Jan 28
6
client first, top down, outside in, etc with rails
I''m starting a new project and I want to try writing the client first. I.e. I want to write my ''views'' first and I would like to mock out all the models in such a way that I can run the site and browse it with the mocked out models. Is it easy to use rspec''s mocking for this sort of thing and has anyone done it before? Does anyone know of a tutorial out there
2008 Jan 11
13
Role of stories vs specs, revisited
A couple months ago I asked how stories and specs might impact each
other. [1] If you look at Dan North''s example of what''s in a story
[2], and you imagine using the spec framework to drive the design, you
can probably imagine a significant bit of overlap in the two. Is that
a bad thing? I''m not sure. It has made me a bit uncomfortable
though, and I''ve
2008 Jan 10
21
Shoulda
Hey, we''re currently using shoulda (http://dev.thoughtbot.com/
shoulda/) on a project and I saw some things that would be really nice
to see in rspec, namely the should_ methods, and especially the
should_be_restful method. Do these go against the rspec goals at
all? Or could an ambitious programmer go to town implementing these
for rspec_on_rails?
Nathan Sutton
fowlduck at
2007 Oct 24
7
NoMethodError when creating new ActiveRecord model object
the strangest thing is happening...i''m not getting this every time,
maybe 1/3 of the time, identical requests...
i''m a rails newbie, but i think i''m trying pretty standard stuff, this
is an excerpt from the log:
----------------------
Processing EmailConfigsController#edit_xml (for 127.0.0.1 at 2007-10-24
15:52:09) [GET]
Session ID: 6630219819a2da423d8c48a259dd28d6
2013 Jan 28
1
How to start working on reby on rails
Hello Friends,
I am new to Ruby on Rails actually i am .net developer, i installed
rails frame work and Aptana Studio3 in my system, i am not getting
Idea
how to start working on ruby on rails , please help me , how to start
working on ruby on rails, if any one have sample project that helps me
a lot.
Thanks in Advance
V.Venkat
--
Posted via http://www.ruby-forum.com/.
--
You
2007 Dec 17
14
Change in isolation behaviour 1.08 - 1.10 ?
Hi,
I just moved from 1.08 to 1.10 and now have one example failing, which,
under 1.08, passed. Is the due to a change in behaviour?
Here''s my spec (removed some passing examples)
require File.dirname(__FILE__) + ''/../spec_helper''
describe "A user" do
before(:each) do
@user = User.new
@valid_user = User.new(
:email =>
2007 Dec 20
19
Story runner rake task
What''s the status on a rake task for the story runner. If nothing is
in progress, where could I start to try and build one?
JD
2014 Oct 02
3
debuggingState() analogous to tracingState() ?
We have had some conversation within R core,
lead by Duncan Murdoch and me, about a proposal
to extend the current tracingState() functionality
by something tentatively called debuggingState().
Duncan has allowed me to copy the previous conversation
(after very minor editing):
The following is quite technical and assumes you know more about
R's debug()ing and trace()ing than an estimated
2007 Oct 31
12
autotest displays no output
Hey, I''m trying to configure autotest with rspec on cygwin but something is
going wrong.
I made a very simple testing environment with a user.rb and user_spec.rb
file. Rspec works fine, but autotest outputs nothing - it just stays here,
idle. ^C doesn''t display anything more.
I can see it''s running because I added require ''autotest/snarl'' in my
2008 Mar 13
3
Stories (well, integration tests) which aren''t plain text
Hi,
Having just played with getting my first plain text story working, I
like how it all fits together. It worked out nicely.
However, I don''t feel our project needs to have stories as plain text,
in fact it''s a slight hindrance for us. Is there any sensible
mechanism for doing integration testing using rspec without plain text
stories?
Thanks,
Rob
2011 Dec 29
1
Cholesky update/downdate
Dear R-devel members,
I am looking for a fast Cholesky update/downdate. The matrix A being
symmetric positive definite (n, n) and factorized as
A = L %*% t(L), the goal is to factor the new matrix A +- C %*% t(C)
where C is (n, r). For instance, C is 1-column when adding/removing an
observation in a linear regression. Of special interest is the case
where A is sparse.
Looking at the
2007 Sep 30
4
autotest stop working, 1.0.9?
My autotest runs but when I make changes to a spec it doesn''t reload.
I checked another application I was building that had 1.0.9 but it was
reloading fine.
How would I debug a problem such as autotest not reloading?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20070930/6be7160d/attachment.html
2007 Jun 21
3
Sqlite3, in-memory db and rspec_server
Hi everyone.
I can''t get the above(subject line) combination to work. If I use a
standard sqlite3 file db for the test db, and spec_server all the
specs on my models pass. If I use an in-memory db for the test db,
script/spec w/o spec_server, they all pass. But if I use in-memory and
spec_server I get the following error:
1)
ActiveRecord::StatementInvalid in ''User should be