spec/spec_helper.rb in danger-apkstats-0.0.2 vs spec/spec_helper.rb in danger-apkstats-0.1.0
- old
+ new
@@ -1,17 +1,23 @@
+# frozen_string_literal: true
+
require "pathname"
-ROOT = Pathname.new(File.expand_path("../../", __FILE__))
+ROOT = Pathname.new(File.expand_path("..", __dir__))
$:.unshift((ROOT + "lib").to_s)
$:.unshift((ROOT + "spec").to_s)
+def fixture_path
+ "#{(ROOT + 'spec' + 'fixture')}/"
+end
+
require "bundler/setup"
require "pry"
require "rspec"
require "danger"
-if `git remote -v` == ''
+if `git remote -v` == ""
puts "You cannot run tests without setting a local git remote on this repo"
puts "It's a weird side-effect of Danger's internals."
exit(0)
end
@@ -61,5 +67,7 @@
# A stubbed out Dangerfile for use in tests
def testing_dangerfile
env = Danger::EnvironmentManager.new(testing_env)
Danger::Dangerfile.new(env, testing_ui)
end
+
+require_relative "stub/command"