From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: using unicorn as a local development server
Date: Fri, 24 Feb 2012 23:10:22 +0000 [thread overview]
Message-ID: <20120224231022.GA13091@dcvr.yhbt.net> (raw)
In-Reply-To: <CAAs37=UJXSmUvcX=nCXt13QBHjEWeC_5Z=x5Qnci6N+8CQvMvA@mail.gmail.com>
Matt Smith <matt@nearapogee.com> wrote:
> Eric Wong wrote:
> > Normally I just write integration tests (sometimes starting unicorn (or
> > zbatery) + hitting it with curl, but often just mocking a Rack env).
> > Unlike most folks that develop apps that run over HTTP, I have a strong
> > aversion to web browsers. I'd rather pipe curl output to "vim -" if I
> > have to look at any text output from the application.
>
> This is slightly off topic, so I will make this concise, or this can
> be taken offline.
>
> What you are talking about, Eric, is exactly the workflow I am working
> toward. I am almost there, but still too dependent on the browser. So
> 2 questions:
> 1) Would you share what you use for integrations tests for rails and
> rack apps in general? (rack test, minitest, capybara, etc.)
For Rack apps, I normally use test/unit (minitest in 1.9) + Rack::Mock*.
test/test_watcher.rb in raindrops[1] is a public example of that.
I don't develop a lot of Rack apps, though. I haven't touched Rails in
ages, but last time I used test/unit and some builtin Rails test
extensions.
If I'm testing within Ruby, I stay with test/unit because it's
bundled/maintained with the latest version(s) of Ruby. Back in the day,
I know some projects had trouble migrating to Ruby 1.9.1 because rspec
wasn't 1.9-compatible at the time (it is now).
Back to Unicorn (and Rainbows!)
-------------------------------
For testing HTTP servers (or anything that interacts with
non-Ruby-components), I'll use scripts in other languages
(shell/Perl/awk) and external tools (e.g. curl) to shake out potential
bugs.
I worry about "self-cancelling" bugs which can be hidden from tests
because I didn't understand something (often Ruby itself) well enough.
Ruby 1.9 encodings is/was especially confusing to me, so I reached
outside of Ruby in many cases.
[1] - git clone git://bogomips.org/raindrops
[2] - For the few Rack apps I write, almost all of them are APIs or
targeted at lynx or curl users. I hate pretty things :)
_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying
next prev parent reply other threads:[~2012-02-24 23:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-24 17:43 using unicorn as a local development server Matt Smith
2012-02-24 23:10 ` Eric Wong [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-02-23 2:29 Patrick J. Collins
2012-02-23 4:30 ` Eric Wong
2012-02-23 5:01 ` Patrick J. Collins
2012-02-23 5:19 ` Eric Wong
2012-02-23 5:49 ` Alex Sharp
2012-02-24 18:47 ` Patrick J. Collins
2012-02-24 19:26 ` Alex Sharp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://yhbt.net/unicorn/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120224231022.GA13091@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhbt.net/unicorn.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).