Sha256: 6cfda479b56c087c1256194317481da4874545e4b300a32140db89c5062238f9

Contents?: true

Size: 397 Bytes

Versions: 3

Compression:

Stored size: 397 Bytes

Contents

class BunBo
  class ContentGenerator
    def initialize(root_path)
      @root_path = root_path
    end

    def generate
      if root_path.join('spec', 'rails_helper.rb').exist?
        "require 'rails_helper'"
      elsif  root_path.join('spec', 'spec_helper.rb').exist?
        "require 'spec_helper'"
      else
        ''
      end
    end

    private

    attr_reader :root_path
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bun_bo-0.2.1 lib/bun_bo/content_generator.rb
bun_bo-0.2.0 lib/bun_bo/content_generator.rb
bun_bo-0.1.4 lib/bun_bo/content_generator.rb