Browse files

renamed _rg_cache to _rg_lines

  • Loading branch information...
1 parent 804932f commit 43867d4ad1fd6980fd844cbc432a416a55784490 @jimweirich committed Sep 14, 2012
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/rspec/given/extensions.rb
  2. +1 −1 spec/lib/rspec/given/file_cache_spec.rb
View
6 lib/rspec/given/extensions.rb
@@ -71,8 +71,8 @@ def _rg_context_info
@_rg_contet_info ||= {}
end
- def _rg_cache
- @_rg_cache ||= LineExtractor.new
+ def _rg_lines
+ @_rg_lines ||= LineExtractor.new
end
# Trigger the evaluation of a Given! block by referencing its
@@ -166,7 +166,7 @@ def Then(&block)
b = block.binding
file = eval "__FILE__", b
line = eval "__LINE__", b
- description = _rg_cache.line(file, line) unless RSpec::Given.source_caching_disabled
+ description = _rg_lines.line(file, line) unless RSpec::Given.source_caching_disabled
if description
cmd = "it(description)"
else
View
2 spec/lib/rspec/given/file_cache_spec.rb
@@ -5,7 +5,7 @@ module Given
DESCRIBE_LINE = __LINE__
describe FileCache do
- Given(:file_name) { "spec/lib/rspec/given/file_cache_spec.rb" }
+ Given(:file_name) { __FILE__ }
Given(:cache) { FileCache.new }
When(:result) { cache.get(file_name) }

0 comments on commit 43867d4

Please sign in to comment.