Sha256: b034802fb9bb870dc71677a51015c5e2802aa935bc0d776ff2772f701b29d9ee

Contents?: true

Size: 324 Bytes

Versions: 1

Compression:

Stored size: 324 Bytes

Contents

require 'erb'

module TurnipFormatter
  class Template
    module StepSource
      def self.build(location)
        @snippet_extractor ||= ::RSpec::Core::Formatters::SnippetExtractor.new
        '<pre class="source"><code class="ruby">' + @snippet_extractor.snippet([location]) + '</code></pre>'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
turnip_formatter-0.0.2 lib/turnip_formatter/template/step_source.rb