Class: Goku::Elements::Spec
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(name, ancestor_names) ⇒ Spec
constructor
A new instance of Spec.
- #to_s ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(name, ancestor_names) ⇒ Spec
Returns a new instance of Spec.
5 6 7 8 9 |
# File 'lib/goku/elements/spec.rb', line 5 def initialize(name, ancestor_names) super(name) @ancestor_names = ancestor_names end |
Instance Method Details
#to_s ⇒ Object
11 12 13 14 15 |
# File 'lib/goku/elements/spec.rb', line 11 def to_s full_name = (@ancestor_names + [name]).map(&:camelcase).join("::") "require \"spec_helper\"\n\ndescribe #{full_name} do\n#{super}\nend" end |