Error when running jspec in server mode

11 views
Skip to first unread message

Jorge Manrubia Díez

unread,
May 6, 2010, 2:40:44 PM5/6/10
to jspec
Hi,

When running:
jspec run -b ff --server

I obtain the next message:
error: undefined local variable or method 'host' for
Sinatra::Application:Class. Use --trace to view backtrace

I have reproduced the problem in a fresh Rails 2.3.5 application which
has been properly initialized with:
jspec init .

Jspec seems to be working right with Browsers tests and also with
Rhino tests.

I have installed:

JSpec 4.3.0
Sinatra 1.0

Any help would be appreciated

I already posted this as an issue in github some time ago (http://
github.com/visionmedia/jspec/issues/issue/168). Sorry for the
duplication.

And contrats for this amazing tool!

--
JSpec thanks you for your interest and support! To post simply reply
to this email.

documentation: http://jspec.info
unsubscribe: jspec+un...@googlegroups.com
group: http://groups.google.com/group/jspec

Kevin Gisi

unread,
May 6, 2010, 2:55:35 PM5/6/10
to js...@googlegroups.com
Hi Jorge,

Sorry - the issue tracker is pretty full up with issues, and sifting through them can sometimes be a bit difficult. I'll have an opportunity to look at that tonight, and I'll follow up on GitHub then.

Thanks!

vision media [ Tj Holowaychuk ]

unread,
May 6, 2010, 3:01:25 PM5/6/10
to js...@googlegroups.com
I think we should remove the "server". its not complete enough, what we really
need is something liek testSwarm but less crappy.. and abstracted from JSpec
--
Tj Holowaychuk
Vision Media
President & Creative Lead

Kevin Gisi

unread,
May 6, 2010, 3:30:50 PM5/6/10
to js...@googlegroups.com
Tj, I agree with you - best to keep the scope of JSpec to JSpec itself. Did you want me to refactor it out?

vision media [ Tj Holowaychuk ]

unread,
May 6, 2010, 3:37:11 PM5/6/10
to js...@googlegroups.com
ya maybe. I dont use it, hell i dont even use JSpec for browser stuff anymore lol but
might be a good idea to get rid of it since its clunky and half finished anyways.

Kevin Gisi

unread,
May 6, 2010, 3:38:18 PM5/6/10
to js...@googlegroups.com
Seriously? Even you're not using JSpec anymore? Lamesauce. What've you moved over to?

vision media [ Tj Holowaychuk ]

unread,
May 6, 2010, 3:40:19 PM5/6/10
to js...@googlegroups.com
no no i do, but i use it for nodejs, i barely touch the client stuff anymore

Kevin Gisi

unread,
May 6, 2010, 3:41:55 PM5/6/10
to js...@googlegroups.com
Ah, fair enough. To be honest, if I sat down and wrote a crapton of watir-cucumber steps, I'd be doing all my browser-checking with integration tests. Still worth using JSpec to unit test abstracted libraries though.

vision media [ Tj Holowaychuk ]

unread,
May 6, 2010, 3:47:49 PM5/6/10
to js...@googlegroups.com
i dont really touch ruby much anymore, to many beefs with it and the community but its alright. cucumber 
is just annoying IMO

Kevin Gisi

unread,
May 6, 2010, 3:52:05 PM5/6/10
to js...@googlegroups.com
Implementation can be a bit of a pain in the ass. But give me an alternative for integration?

vision media [ Tj Holowaychuk ]

unread,
May 6, 2010, 3:54:20 PM5/6/10
to js...@googlegroups.com
I dont go overboard with that stuff,
writing 30+ specs to have complete coverage of a single route 
is ... lame lol

Kevin Gisi

unread,
May 6, 2010, 3:55:43 PM5/6/10
to js...@googlegroups.com
Nah, you can't write integration specs on a coverage basis. But it serves to provide requirements to your clients.

acorretti

unread,
May 9, 2010, 11:47:30 AM5/9/10
to jspec
Hi,

I've solved this issue by making JSpec::Server a subclass of
Sinatra::Application, while detecting the first rack handler available
from %w[thin mongrel webrick].

You can check my commit here:
http://github.com/acorretti/jspec/commit/0c14f30ab157018a7de30979c773f58824e604f7

I can send a pull request if you want.

Alfonso Corretti

On May 6, 8:40 pm, Jorge Manrubia Díez <jorge.manru...@gmail.com>
wrote:

vision media [ Tj Holowaychuk ]

unread,
May 9, 2010, 9:45:31 PM5/9/10
to js...@googlegroups.com
I still think its probably best to get rid of this. You really SHOULD 
be handling cross browser stuff with a CI server IMO, but I guess sometimes its
nice to have a quick sanity check
--
Tj Holowaychuk
Vision Media
President & Creative Lead

acorretti

unread,
May 9, 2010, 10:22:55 PM5/9/10
to jspec
Right, specially when rapidly driving your development by testing on
real browsers, prefer reloading instead of re-typing a command, and/or
when some browsers enforce blind sandboxes between frames in file:///
schemes and you need that.

It's sanely useful when your QA dept. has their own approval process,
split apart from the development process.

Personally I find jspec attractive vs. the rspec-cucumber-harmony-
culerity-celerity salad just because it runs in plain javascript (and
thus is extremely portable), and because it allows a quite smooth
integration with jscoverage to provide acceptable code coverage
statistics -- which is something the ruby salad mix can't provide,
although give a way easier marketing-proof DSL (gherkin).

This jscoverage integration is made through a custom command & module
and some templates. It describes its own suite with a "should cover
all of the available code" requirement expecting jscoverage's result
to be 100 at runtime in the 'running' hook, and then beforeSuite waits
until this exact suite is executed to calculate jscoverage's results.
Soon I'll push it to my github repo as well.

Kudos to your also handy commander and bind :)

A.

On May 10, 3:45 am, "vision media [ Tj Holowaychuk ]" <t...@vision-
media.ca> wrote:
> I still think its probably best to get rid of this. You really SHOULD
> be handling cross browser stuff with a CI server IMO, but I guess sometimes
> its
> nice to have a quick sanity check
>
>
>
>
>
> On Sun, May 9, 2010 at 8:47 AM, acorretti <acorre...@gmail.com> wrote:
> > Hi,
>
> > I've solved this issue by making JSpec::Server a subclass of
> > Sinatra::Application, while detecting the first rack handler available
> > from %w[thin mongrel webrick].
>
> > You can check my commit here:
>
> >http://github.com/acorretti/jspec/commit/0c14f30ab157018a7de30979c773...
> > > unsubscribe: jspec+un...@googlegroups.com<jspec%2Bunsu...@googlegroups.com>
> > > group:http://groups.google.com/group/jspec
>
> > --
> > JSpec thanks you for your interest and support! To post simply reply
> > to this email.
>
> > documentation:http://jspec.info
> > unsubscribe: jspec+un...@googlegroups.com<jspec%2Bunsu...@googlegroups.com>
> > group:http://groups.google.com/group/jspec
>
> --
> Tj Holowaychuk
> Vision Media
> President & Creative Lead
>
> --
> JSpec thanks you for your interest and support! To post simply reply
> to this email.
>
> documentation:http://jspec.info
> unsubscribe: jspec+un...@googlegroups.com
> group:http://groups.google.com/group/jspec

vision media [ Tj Holowaychuk ]

unread,
May 10, 2010, 10:35:03 AM5/10/10
to js...@googlegroups.com
ya I am using jscoverage on a project right now, its alright,
pretty beefy library for such a small simple task but hey. Once
I expose V8's json ast I will probably write a node alternative 
Reply all
Reply to author
Forward
0 new messages