Donnerstag, 21. Oktober 2010

Woooha. Real BDD using rspec in real life!


hi there...

long time no see. Well, I did continue with my learning tests but that's nothing that might be interesting for anyone except me...

But today I learned new stuff
a) there is no 1.9 ruby for cygwin (yet). I use v1.8.7 :-(
b) I cant use this
inst_section = {
  cello:    'string'
  clarinet: 'woodwind',
  ...
}
This is the new feature "New literal hash syntax" in ruby. See http://svn.ruby-lang.org/repos/ruby/tags/v1_9_1_0/NEWS
d) also have a look here: http://www.ruby-lang.org/de/news/2009/02/01/ruby-1-9-1-verffentlicht/ and here: http://www.ruby-lang.org/de/news/2010/08/24/ruby-1-9-2-verffentlicht/
  
But the coolest part I stubled across when I looked for v1.8 / v1.9 differences:  http://www.rubyspec.org/ These guys are using rubys rspec to write a (or maybe _the_) comprehensive ruby spec! As executable BDD code! COOL!.

Wanna see an example of the spec? Have a look here, even I a am still on page #21 in my ruby bible I am able to understand this spec! Great, imagin every business analyst would write such a spec!!! http://github.com/rubyspec/rubyspec/blob/master/core/array/flatten_spec.rb

Keine Kommentare:

Kommentar veröffentlichen