Mario Ruiz <mario / betware.com> wrote:

> n my test cases I'll have in the first line for example:
> include Scenarios::MySecondSc
> and if I want to change the scenario I only have to change this line:
> include Scenarios::MyFirstSc

I think this code will do what you require

module Scenarios

  module Default
      def self.included(mod)
            super(mod) 
          $bab="defaultmodulevalue"
        end
  end
  
module DefaultHidden
      def self.included(mod)
            super(mod)
        $bab="hiddenmodulevalue"
      end
  end
 
 module DefaultSecond
      def self.included(mod)
            super(mod)
      $bab="secondmodulevalue"
      end
  end
end

Module#included gets sent automatically by Ruby when you include a
module, so you do not need to invoke it explicitly.
-- 
Morel