Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Uses temp StaleFish config ignored by git

  • Loading branch information...
commit 1b65016619a2bfe6c4d294a99947dd325b30b457 1 parent f5f50f1
@tomazy tomazy authored
Showing with 7 additions and 2 deletions.
  1. +1 −0  .gitignore
  2. +6 −2 spec/spec_helper.rb
View
1  .gitignore
@@ -7,3 +7,4 @@ vendor
.bundle
.idea
request_test.rb
+stale_fish-tmp.yml
View
8 spec/spec_helper.rb
@@ -1,4 +1,5 @@
require 'bundler'
+require 'fileutils'
Bundler.require(:default, :runtime, :test)
$LOAD_PATH.unshift(File.dirname(__FILE__))
@@ -27,10 +28,13 @@ def is_stale?
# in ./support/ and its subdirectories.
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
-StaleFish.setup(File.join(File.dirname(__FILE__), 'fixtures', 'stale_fish.yml'))
RSpec.configure do |config|
- # config.include(Rack::Test::Methods)
+ # 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
Please sign in to comment.
Something went wrong with that request. Please try again.