Displaying 20 results from an estimated 6000 matches similar to: "503 error and (61)Connection refused: proxy: HTTP: attempt to connect"
2007 Sep 07
3
Fails to restart mongrel cluster after Capistrano rollback (PIDs not deleted)
Hi,
I am deploying a Rails website using Capistrano to a VPS running the
site through Apache and Mongrel.
''cap deploy'' works fine, and mongrels are restarted. When I execute
''cap deploy:rollback'', however, my script fails to restart the
mongrels giving this error:
!!! PID file tmp/pids/mongrel.5000.pid already exists. Mongrel could
be running already.
2007 May 31
28
Another attempt for a succinct model validation DSL
On 5/28/07, David Chelimsky <dchelimsky at gmail.com> wrote:
> The behaviour you''re trying to describe is that the User should
> require that passwords bear certain qualities - in this case a length
> between 5 and 40. So you need to ask yourself how the User should
> behave when this requirement is violated, and then specify that it
> behaves that way.
>
>
2006 Dec 24
6
What do you think of this controller spec?
Here''s a controller spec I wrote, it''s for a very simple RESTful
controller (well, aren''t all RESTful controllers simple? :)
I''ve created a couple spec helper methods to refactor some of the
common code...for example, require_login_and_correct_user creates two
specifications: one for when the user isn''t logged in, and one when
the user is logged in but
2007 Jun 09
11
authentication, controller specs. I think I''m missing something simple ....
Hi all,
I feel like I''m missing something really easy and I''m just not seeing
it.
I''m using the restful_authentication plugin and have a User model. Uesr
has_many :things and Thing belongs_to :user.
That''s it.
I did a "script/generate rspec_scaffold thing" to generate all the
necessary bits. The "rake db:migrate" to create the db.
At
2007 Aug 07
4
Problems with raising errors on a mocked object
I''m trying to mock a object to raise a certain error. By doing so I
get a ArgumentError on ActiveRecord''s save! method:
http://pastie.caboo.se/85628
I''ve tried to debug it but just can''t seem to find what I''m doing
wrong. Any help is greatly appreciated.
Cheers,
Eivind Uggedal
2007 Jun 07
6
Problem with response.should render_template
Hello, I have problems with this spec controllers:
http://pastie.caboo.se/68634
when I run:
rake spec:controllers
I get this error:
...............F......
1)
''DocTypeController should update and redirect to show'' FAILED
expected redirect to {:action=>"show", :id=>1}, got redirect to
2007 Aug 12
3
Scope and specing models
Hello all, I''m currently having an issue with some specs, specifically scope
issues (probably more of a scope issue than a spec issue at this point)...
Here''s the error:
ActiveRecord::AssociationTypeMismatch in ''A new User should know what role
it has''
Role expected, got NilClass
D:/ruby/projects/restful_authentication_test/config/../app/models/role.rb:5:in
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 Oct 19
11
Patch idea for rspec_on_rails
I recently wrote a matcher for testing AR associations which allows
you to specify things like:
Foo.should have_many(:bars).through(:bazes)
I''m pretty darned proud of it and a couple of people have suggested
that I should submit it to the rspec_on_rails project. Before I go to
the trouble of writing out rdoc and fully spec''ing it, I just wanted
to make sure this was
2007 Aug 06
5
Problems with array mock
Hi everyone,
I''m trying this in my helper spec and it didn''t work:
@curr_odontogram.should_receive(''photos[1]'').and_return(@photo)
and the error is:
SyntaxError in ''PersonHelper Deberia devolverme un link para eliminar una foto''
compile error
/home/gramos/src/rails/r-dental/config/../vendor/plugins/rspec/lib/spec/mocks/proxy.rb:99:
syntax
2007 Jun 28
23
DRYing link_to with a symbol
Hi, I just put in a patch that allows you to DRY up this:
<%= link_to @company.name, @company %>
to this:
<%= link_to :name, @company %>
The symbol indicates the method to be called on the object passed in
the link_to options.
http://dev.rubyonrails.org/ticket/8789
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
2007 Jun 05
6
Help with spec controller
Hello,
I haven''t been able to create a controller spec.
You can see the code here:
http://pastie.caboo.se/67980
The error message I''m getting is:
Spec::Mocks::MockExpectationError in ''PersonController should tell the Person
model to create a new person on POST to create''
Mock ''person'' received unexpected message :save with (no args)
2007 Apr 12
19
Multiple Model Search
[from out-of-band communication with steven, just for the record]
Hi!
On Wed, Apr 11, 2007 at 01:47:49PM +0200, Steven Garcia wrote:
> Hey Jens,
>
[..]
>
> 1. Is the Search model just an Active Record object or do I need to
> set up a database for it as well (if so then with what columns)?
No, that search model is just a plain class that backs your search form.
If you want to
2007 Sep 20
4
issues submitting a search form
Hello to the list and thanks to Aaron for the cool software.
I''ve been fooling around with Mechanize and Hpricot for a couple of
days and from the docs I''ve read, the following code SHOULD work but
doesn''t. I''ve tried the same code on a couple of different sites and I
get the same exception for each. Any pointers or suggestions are
appreciated.
2008 May 03
6
Everyone Using Rspec Autotest?
I haven''t been spec''ing lately, but been hopping back on and adding
autotest.
However I get an error:
http://pastie.caboo.se/177538/wrap
I also noticed a post by Scott and there was mention of rspec_autotest.
Is this is what everyone is using?
http://svn.caldersphere.net/svn/main/plugins/rspec_autotest/
2006 Jul 28
11
Forum
Im making forum and i have problem with paths.
Here is code:
http://pastie.caboo.se/6389
With this code, it works. But its a bit weird to use so many paths
function. For every path i need to make new function. So can you suggest
me something.
Tables are like here:
http://wiki.rubyonrails.com/rails/pages/ForumExample
--
Posted via http://www.ruby-forum.com/.
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
2007 Aug 02
3
Code works in console but fails test?
So I have message model and each user has many messages. When I run
user.messages in the console it returns correctly, however in the test
it returns and empty collection? Any thoughts. All the sql is being
generate correctly, I checked the log. Here''s a pastie with the code
in question.
http://pastie.caboo.se/84337
--~--~---------~--~----~------------~-------~--~----~
You received
2007 Jun 15
3
dynamic specs
I''d like to test that my model attributes are properly protected against mass
assignment, something like:
it "should NOT update :balance on mass assignment" do
@account.attributes = {:balance => 1000}
@account.balance.should_not == 1000
end
instead of doing each attribute manually however, I''d like to automate it so
I can pass a list of attributes which CAN be
2007 Sep 21
5
Stubbing yielding methods
I''ve just been tying my brain in knots looking at bug #8687 (
http://rubyforge.org/tracker/index.php?func=detail&aid=8687&group_id=1917&atid=7477
).
I''ve been (1) trying to work out whether there is anything logically wrong
with Mocha''s existing behaviour and (2) whether Mocha should support the
requested functionality.
It all centres around the use of the