Displaying 1 result from an estimated 1 matches for "new_aspect".
2007 Jun 27
6
Aspects in RSpec 1.0.5
...def aspect(name,&block)
Behaviour.aspect << name.to_s
yield
Behaviour.aspect.pop
end
end
end
class Behaviour
@@aspect = []
def self.aspect
@@aspect
end
def self.aspect=(new_aspect)
@@aspect = new_aspect
end
alias :original_initialize :initialize
def initialize(*args,&context_block)
result = original_initialize(*args, &context_block)
@name = "(#{self.class.aspect.join("/")}) #{@name}" unle...