Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

MichaƂ Kwiatkowski http://joker.linuxstuff.pl

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Extending 'context' with new methods in RSpec

Define a new method like this:

   1  
   2  module Spec::Runner::ContextEval::ModuleMethods
   3    def new_method
   4      # ...
   5    end
   6  end


Then use like that:

   1  
   2  context "Some state" do
   3    new_method
   4  end
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS