Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rename LineCache => LineExtractor

  • Loading branch information...
commit 4203a225fd6a8a578f8d8cbcc947f375bffa6c67 1 parent 14b8960
@jimweirich authored
View
2  lib/rspec/given/extensions.rb
@@ -72,7 +72,7 @@ def _rg_context_info
end
def _rg_cache
- @_rg_cache ||= LineCache.new
+ @_rg_cache ||= LineExtractor.new
end
# Trigger the evaluation of a Given! block by referencing its
View
4 lib/rspec/given/line_cache.rb
@@ -2,7 +2,7 @@
module RSpec
module Given
- class LineCache
+ class LineExtractor
def initialize(file_cache=nil)
@files = file_cache || FileCache.new
end
@@ -13,7 +13,7 @@ def line(file_name, line)
end
def to_s
- "<LineCache>"
+ "<LineExtractor>"
end
private
View
4 spec/lib/rspec/given/line_cache_spec.rb
@@ -3,7 +3,7 @@
module RSpec
module Given
- describe LineCache do
+ describe LineExtractor do
class FauxFileCache
def initialize(lines)
@@ -17,7 +17,7 @@ def get(file_name)
Given(:file) { "MIT-LICENSE" }
Given(:line) { 2 }
Given(:file_cache) { FauxFileCache.new(input) }
- Given(:cache) { LineCache.new(file_cache) }
+ Given(:cache) { LineExtractor.new(file_cache) }
When(:result) { cache.line(file, line) }
Please sign in to comment.
Something went wrong with that request. Please try again.