spec/spec_helper.rb in brief-0.0.5 vs spec/spec_helper.rb in brief-1.0.0

- old
+ new

@@ -1,25 +1,23 @@ -spec = File.dirname(__FILE__) -$LOAD_PATH.unshift(spec) unless $LOAD_PATH.include?(spec) - -lib = File.join(File.dirname(__FILE__), '../lib') -$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) - require 'pry' require 'brief' +Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } + module Brief - def self.project_overview_example - @project_overview_example ||= Brief::Document.new fixtures.join("project_overview.md") + def self.spec_root + Pathname(File.dirname(__FILE__)) end - def self.test_documents - @test_documents ||= fixtures.children.select {|f| f.file? }.map {|c| Brief::Document.new(c) } + def self.example_path + example.root end - def self.fixtures - spec = File.dirname(__FILE__) - Pathname(spec).join("fixtures") + def self.example + @example ||= Brief::Briefcase.new(root:spec_root.join("fixtures","example")) end end -Brief.test_documents +RSpec.configure do |config| + config.mock_with :rspec + #config.order = "random" +end