On Friday 21 December 2007, Nicolás Sanguinetti wrote:
> For those of you who happen to also use ruby, and particularly rspec,
> I've been playing with a clone of rspec in javascript :)
> I suck at naming stuff, so it's called js-spec, and depends on Proto
> 1.6.
>
> http://code.google.com/p/js-spec/

> To Do:
> - code an HTML report :)

Did you have a look at JSSpec?

http://jania.pe.kr/aw/moin.cgi/JSSpec

The UI looks nice, but I like your syntax better.

> Feedback is much appreciated ;-)

I've tried this simplistic spec

var C = Class.create({
  m: function() { return 'Hello'; }
});

with (Spec) {
  describe('A new C', function() { with (this) {
    before('each', function() {
      this.c = new C();
    });
    it('should respond to m', function() {
      this.c.should(respondTo('m')); //'this' is apparently needed
    });
    it('should greet me', function() {
      this.c.should(be('Hello'));
    });
  }});
}
Spec.run();

I've run it in Firefox 2.0.0.11 using Prototype 1.6.0.1. The output I 
get is this

[FAIL] should respond to m with: undefined
[FAIL] should greet me with: undefined

I've stepped through it in Firebug, however not very systematically. At 
least for the second test, apparently at some point the string 'Hello' 
is converted into an array ['H', 'e', 'l', 'l', 'o'].

Michael

-- 
Michael Schuerig
mailto:[EMAIL PROTECTED]
http://www.schuerig.de/michael/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to