Flowdock
method

share_as

Importance_1
1.1.4 - Show latest stable - 0 notes - Class: Spec::Extensions::Main
share_as(name, &block) public

Creates a Shared Example Group and assigns it to a constant

 share_as :AllEditions do
   it "should do all editions stuff" ...
 end

 describe SmallEdition do
   it_should_behave_like AllEditions

   it "should do small edition stuff" do
     ...
   end
 end

And, for those of you who prefer to use something more like Ruby, you can just include the module directly

 describe SmallEdition do
   include AllEditions

   it "should do small edition stuff" do
     ...
   end
 end
Show source
Register or log in to add new notes.