Netzrauschen - posts tagged 'rspec' http://netzrauschen.tknetwork.de/ Netzrauschen - posts tagged 'rspec' - posts tagged 'rspec' http://netzrauschen.tknetwork.de/ http://asset.soup.io/asset/0321/1177_24e5.png 48 48 Tech &amp;amp; Culture: Fundstücke aus Netz und RL, zusammengestellt und kommentiert aus Sicht eines Teilzeit-Geeks. »In zwanzig Jahren wirst Du mehr enttäuscht sein von den Dingen die Du nicht getan hast, als von den Dingen, die Du getan hast. Also wirf die Leinen los. Verlasse den sicheren Hafen. Lass den Passatwind in Deine Segel wehen. Erforsche. Träume. Entdecke.« Mark Twain Xing | Twitter joshknowles's rspec-on-rails-matchers at master - GitHub <p>A collection of RSpec matchers to be used with the Ruby on Rails project</p> <p><a href="http://github.com/joshknowles/rspec-on-rails-matchers/tree">http://github.com/joshknowles/rspec-on-rails-matchers/tree</a></p>Thu, 04 Feb 2010 07:57:41 GMThttp://netzrauschen.tknetwork.de/post/44350916/joshknowless-rspec-on-rails-matchers-at-masterurn:www-soup-io:1:44350916linkrspecrails Stubbing Chained Methods with Rspec - Stack Overflow <p>Client.stub!(:named_scope).and_return(@clients = mock([Client])) @clients.stub!(:first).and_return(@client = mock(Client))</p> <p><a href="http://stackoverflow.com/questions/664755/stubbing-chained-methods-with-rspec">http://stackoverflow.com/questions/664755/stubbing-chained-methods-with-rspec</a></p>Wed, 02 Sep 2009 20:35:34 GMThttp://netzrauschen.tknetwork.de/post/27294277/Stubbing-Chained-Methods-with-Rspec-Stack-Overflowurn:www-soup-io:1:27294277linkrailsnamed_scoperspec Mocking/Stubbing partials and helper methods in RSpec view specs <p>In my previous post I whined about not knowing how to mock/stub partials and helper methods in RSpec view specs. Now I have the answer and I’d like to thank the RSpec users mailing list and David Chelimsky for taking my phone call.</p> <p><a href="http://jakescruggs.blogspot.com/2007/03/mockingstubbing-partials-and-helper.html">http://jakescruggs.blogspot.com/2007/03/mockingstubbing-partials-and-helper.html</a></p>Mon, 20 Jul 2009 09:09:09 GMThttp://netzrauschen.tknetwork.de/post/23625967/Mocking-Stubbing-partials-and-helper-methods-inurn:www-soup-io:1:23625967linkrspecrailshelper vandrijevik's with_time_frozen_at at master - GitHub <p>with_time_frozen_at makes time-sensitive testing using Test::Unit in Ruby super-easy!</p> <p><a href="http://github.com/vandrijevik/with_time_frozen_at/tree/master">http://github.com/vandrijevik/with_time_frozen_at/tree/master</a></p>Thu, 16 Jul 2009 14:13:42 GMThttp://netzrauschen.tknetwork.de/post/23348701/vandrijeviks-with-time-frozen-at-at-masterurn:www-soup-io:1:23348701linkrubyrspecrailstime the rails loft - matchers_in_have_tag_blocks.should be(/with_tag/) <p>Unfortunately, calling have_tag within a have_tag block won't raise an error. There's no mechanism that will warn you that your inner have_tag is ineffective. The results of the inner have_tag will simply be ignored.</p> <p><a href="http://railsloft.com/posts/matchers_in_have_tag_blocks-should-be-with_tag">http://railsloft.com/posts/matchers_in_have_tag_blocks-should-be-with_tag</a></p>Thu, 04 Jun 2009 14:37:43 GMThttp://netzrauschen.tknetwork.de/post/20699604/the-rails-loft-matchers-in-have-tagurn:www-soup-io:1:20699604linkrailsrspecruby Using rspec have_tag | Ruby Pond <p>Not everyone realises that that rspec havetag assertion is simply a wrapper for the Test::Unit assertselect. And even if you do, do you really know how powerful a tool it is? I’ve seen many tests and specs where people jump through a whole heap of hoops to check that the desired element exists, well no more! Fresh for today, a quick run down on some of the most useful and powerful selectors you can use with havetag (and by default, assertselect too)</p> <p><a href="http://rubypond.com/articles/2008/03/31/using-rspec-have_tag/">http://rubypond.com/articles/2008/03/31/using-rspec-have_tag/</a></p>Thu, 04 Jun 2009 14:32:57 GMThttp://netzrauschen.tknetwork.de/post/20699605/Using-rspec-have-tag-Ruby-Pondurn:www-soup-io:1:20699605linkrspecrailsrubybddtutorial