Module: Spec::Runner::ContextEval::ModuleMethods

Defined in:
lib/rspec-ext/spec_aspect.rb,
lib/rspec-ext/specify_negatively.rb

Instance Method Summary collapse

Instance Method Details

#aspect(name, &block) ⇒ Object



20
21
22
23
24
# File 'lib/rspec-ext/spec_aspect.rb', line 20

def aspect(name,&block) 
  Specification.aspect << name.to_s
  yield
  Specification.aspect.pop
end

#specify_negatively(spec_name, opts = {}, &block) ⇒ Object



23
24
25
26
# File 'lib/rspec-ext/specify_negatively.rb', line 23

def specify_negatively(spec_name, opts={}, &block)                                                  
  options = opts.reverse_merge(:reason=>"NOT YET IMPLEMENTED")                                                                           
  specifications << NegativeSpecification.new("NEGATIVE: #{spec_name} (#{options[:reason]})", options, &block)                                                                                                      
end