Module: Spec::Matchers::ModuleMethods

Included in:
Spec::Matchers
Defined in:
lib/spec/matchers.rb

Instance Method Summary collapse

Instance Method Details

#description_generated(callback) ⇒ Object



135
136
137
# File 'lib/spec/matchers.rb', line 135

def description_generated(callback)
  description_generated_callbacks << callback
end

#generated_description=(name) ⇒ Object



143
144
145
146
147
# File 'lib/spec/matchers.rb', line 143

def generated_description=(name)
  description_generated_callbacks.each do |callback|
    callback.call(name)
  end
end

#unregister_description_generated(callback) ⇒ Object



139
140
141
# File 'lib/spec/matchers.rb', line 139

def unregister_description_generated(callback)
  description_generated_callbacks.delete(callback)
end