Sha256: 61e87a2d430a1476fe90fd4b9486cd2a2255f57e1a4264ccf4ec902531907207

Contents?: true

Size: 1.16 KB

Versions: 5

Compression:

Stored size: 1.16 KB

Contents

require 'pry'
require 'rack/test'
require 'brief'

ENV['BRIEF_DEBUG'] = "true"

Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

module Brief
  def self.spec_root
    Pathname(File.dirname(__FILE__))
  end

  def self.example_path
    testcase.root
  end

  def self.concept_document
    path = Brief.example_path.join("docs","concept.html.md")
    testcase.document_at(path)
  end

  def self.persona_document
    path = Brief.example_path.join("docs","persona.html.md")
    testcase.document_at(path)
  end


  def self.page_document
    path = Brief.example_path.join("docs","page.html.md")
    testcase.document_at(path)
  end

  def self.example_document
    path = Brief.example_path.join("docs","epics","epic.html.md")
    testcase.document_at(path)
  end

  def self.testcase
    @example ||= Brief::Briefcase.new(root:spec_root.join("fixtures","example"))
  end
end

RSpec.configure do |config|
  config.mock_with :rspec
  config.include Rack::Test::Methods
  config.include TestHelpers

  config.after(:suite) do
    `git checkout spec/fixtures/example/docs` rescue nil
  end
end

ENV['BRIEF_APPS_PATH'] = Brief.spec_root.join("fixtures","apps").to_s

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
brief-1.17.14 spec/spec_helper.rb
brief-1.17.13 spec/spec_helper.rb
brief-1.17.12 spec/spec_helper.rb
brief-1.17.11 spec/spec_helper.rb
brief-1.17.10 spec/spec_helper.rb