Sha256: f7fd87e3909864a0b433158e81be7736ceb287fbee5a212c6a7dbe8ff0cd7742

Contents?: true

Size: 1.32 KB

Versions: 12

Compression:

Stored size: 1.32 KB

Contents

require 'bundler'
require 'fileutils'

Bundler.require(:default, :runtime, :test)
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))

require 'pivotal-tracker'
require 'rspec'
require 'rspec/autorun'

PROJECT_ID = ENV['PROJECT_ID'] || 102622
TOKEN = '8358666c5a593a3c82cda728c8a62b63'

PivotalTracker::Client.token = TOKEN

# tm: hack StaleFish to prevent it from accessing real API which slows down the test.
#   Fixtures should be upated manually.
module StaleFish
  class Fixture
    def is_stale?
      false
    end
  end
end

# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}


RSpec.configure do |config|
  # Give StaleFish temporary file which is ignored by git
  org_stale_fish_config = File.join(File.dirname(__FILE__), 'fixtures', 'stale_fish.yml')
  tmp_stale_fish_config = File.join(File.dirname(__FILE__), 'fixtures', 'stale_fish-tmp.yml')
  FileUtils.copy_file org_stale_fish_config, tmp_stale_fish_config, :remove_destination => true
  StaleFish.setup(tmp_stale_fish_config)

  config.before :suite do
    StaleFish.update_stale
  end

  config.before :each do
    PivotalTracker::Client.clear_connections
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
pivotal-tracker-fox-0.5.13 spec/spec_helper.rb
pivotal-tracker-fox-0.5.12 spec/spec_helper.rb
pivotal-tracker-fox-0.5.11 spec/spec_helper.rb
pivotal-tracker-fox-0.5.10 spec/spec_helper.rb
pivotal-tracker-0.5.10 spec/spec_helper.rb
pivotal-tracker-0.5.9 spec/spec_helper.rb
pivotal-tracker-0.5.8 spec/spec_helper.rb
pivotal-tracker-0.5.7 spec/spec_helper.rb
pivotal-tracker-0.5.6 spec/spec_helper.rb
pivotal-tracker-0.5.5 spec/spec_helper.rb
pivotal-tracker-0.5.4 spec/spec_helper.rb
pivotal-tracker-0.5.3 spec/spec_helper.rb