From b5267c1a8fda1784e5a4892ee227f5e4fb57e804 Mon Sep 17 00:00:00 2001 From: Chris Schlaeger Date: Sat, 12 Sep 2015 21:54:53 +0200 Subject: Adding plumbing to have PEROBS as additional dependency. --- spec/ActivitySummary_spec.rb | 2 +- spec/FlexiTable_spec.rb | 1 + spec/PostRunner_spec.rb | 3 ++- spec/View_spec.rb | 1 + spec/spec_helper.rb | 7 +++++++ 5 files changed, 12 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/ActivitySummary_spec.rb b/spec/ActivitySummary_spec.rb index 08e2b15..b3d77b0 100644 --- a/spec/ActivitySummary_spec.rb +++ b/spec/ActivitySummary_spec.rb @@ -10,8 +10,8 @@ # published by the Free Software Foundation. # -require 'postrunner/ActivitySummary' require 'spec_helper' +require 'postrunner/ActivitySummary' class Activity < Struct.new(:fit_activity, :sport) end diff --git a/spec/FlexiTable_spec.rb b/spec/FlexiTable_spec.rb index 5a03c56..c3357cd 100644 --- a/spec/FlexiTable_spec.rb +++ b/spec/FlexiTable_spec.rb @@ -10,6 +10,7 @@ # published by the Free Software Foundation. # +require 'spec_helper' require 'postrunner/FlexiTable' describe PostRunner::FlexiTable do diff --git a/spec/PostRunner_spec.rb b/spec/PostRunner_spec.rb index e146e3f..4ca5a4a 100644 --- a/spec/PostRunner_spec.rb +++ b/spec/PostRunner_spec.rb @@ -12,8 +12,8 @@ require 'fileutils' -require 'postrunner/Main' require 'spec_helper' +require 'postrunner/Main' describe PostRunner::Main do @@ -38,6 +38,7 @@ describe PostRunner::Main do FileUtils.rm_rf(@db_dir) FileUtils.rm_rf('FILE1.FIT') FileUtils.rm_rf('FILE2.FIT') + FileUtils::rm_rf('icons') end it 'should abort without arguments' do diff --git a/spec/View_spec.rb b/spec/View_spec.rb index 7a90a01..538b71f 100644 --- a/spec/View_spec.rb +++ b/spec/View_spec.rb @@ -10,6 +10,7 @@ # published by the Free Software Foundation. # +require 'spec_helper' require 'postrunner/View' require 'postrunner/ViewButtons' require 'postrunner/PagingButtons' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7c15dbb..691f097 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -10,6 +10,13 @@ # published by the Free Software Foundation. # +# Some dependencies may not be installed as Ruby Gems but as local sources. +# Add them and the postrunner dir to the LOAD_PATH. +%w( postrunner fit4ruby perobs ).each do |lib_dir| + $:.unshift(File.join(File.dirname(__FILE__), '..', '..', lib_dir, 'lib')) +end +puts $: + def create_fit_file(name, date, duration_minutes = 30) Fit4Ruby.write(name, create_fit_activity(date, duration_minutes)) end -- cgit v1.2.3