spec/spec_helper.rb in faml-0.3.5 vs spec/spec_helper.rb in faml-0.3.6
- old
+ new
@@ -14,14 +14,15 @@
module RenderSpecHelper
if ENV['GENERATE_INCOMPATIBILITIES'] == '1'
require_relative 'support/incompatibilities_generator'
def render_string(str, options = {})
+ loc = caller_locations(1..1)[0]
eval(Faml::Engine.new(options).call(str)).tap do |html|
- IncompatibilitiesGenerator.instance.record(str, options, html, RSpec.current_example)
+ IncompatibilitiesGenerator.instance.record(str, options, html, RSpec.current_example, loc.lineno)
end
rescue => e
- IncompatibilitiesGenerator.instance.record(str, options, e, RSpec.current_example)
+ IncompatibilitiesGenerator.instance.record(str, options, e, RSpec.current_example, loc.lineno)
raise e
end
else
def render_string(str, options = {})
eval(Faml::Engine.new(options).call(str))