Skip to content

Commit

Permalink
rename method and avoid collision with 'assignments'
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Mar 2, 2010
1 parent 046ba64 commit dd11a47
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/rspec/core/example_group.rb
Expand Up @@ -202,9 +202,8 @@ def self.to_s
end

def self.let(name, &block)
# Should we block defining method names already defined?
define_method(name) do
assignments[name] ||= instance_eval(&block)
__memoized[name] ||= instance_eval(&block)
end
end

Expand All @@ -216,13 +215,13 @@ def described_class
self.class.describes
end

def assignments
@assignments ||= {}
def __memoized
@__memoized ||= {}
end

def __reset__
instance_variables.each { |ivar| remove_instance_variable(ivar) }
assignments.clear
__memoized.clear
end

end
Expand Down

0 comments on commit dd11a47

Please sign in to comment.