method

share_as

rspec latest stable - Class: Spec::Extensions::Main

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (1.1.4) is shown here.

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