Sha256: 8a27dd7effc7b612fd33fba746084413073eba0f31986cc86046072179d0a818

Contents?: true

Size: 1.13 KB

Versions: 22

Compression:

Stored size: 1.13 KB

Contents

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

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

22 entries across 22 versions & 1 rubygems

Version Path
brief-1.17.9 spec/spec_helper.rb
brief-1.17.8 spec/spec_helper.rb
brief-1.17.7 spec/spec_helper.rb
brief-1.17.5 spec/spec_helper.rb
brief-1.17.4 spec/spec_helper.rb
brief-1.17.3 spec/spec_helper.rb
brief-1.17.2 spec/spec_helper.rb
brief-1.17.1 spec/spec_helper.rb
brief-1.17.0 spec/spec_helper.rb
brief-1.16.2 spec/spec_helper.rb
brief-1.16.1 spec/spec_helper.rb
brief-1.16.0 spec/spec_helper.rb
brief-1.15.5 spec/spec_helper.rb
brief-1.15.4 spec/spec_helper.rb
brief-1.15.3 spec/spec_helper.rb
brief-1.15.2 spec/spec_helper.rb
brief-1.15.1 spec/spec_helper.rb
brief-1.15.0 spec/spec_helper.rb
brief-1.14.3 spec/spec_helper.rb
brief-1.14.2 spec/spec_helper.rb