diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/app_test.rb | 10 | ||||
| -rw-r--r-- | test/test_helper.rb | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/test/app_test.rb b/test/app_test.rb index 28acba9..7f7ae28 100644 --- a/test/app_test.rb +++ b/test/app_test.rb @@ -1,6 +1,12 @@ require 'test_helper' class AppTest < Test::Unit::TestCase + def setup + # touch config to avoid triggering manual config + FileUtils.mkdir_p HCl::App::HCL_DIR + FileUtils.touch File.join(HCl::App::HCL_DIR, "config.yml") + end + def test_commands app = HCl::App.new assert HCl::Commands.instance_methods.all? { |c| app.command? c }, 'all methods are commands' @@ -8,9 +14,7 @@ class AppTest < Test::Unit::TestCase def test_command_show HCl::DayEntry.expects(:all).returns [HCl::DayEntry.new( - hours:'2.06', - notes: 'hi world', - project: 'App' + hours:'2.06', notes:'hi world', project:'App' )] HCl::App.command 'show' end diff --git a/test/test_helper.rb b/test/test_helper.rb index 8b4f7a0..15741d4 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -13,9 +13,6 @@ require 'fileutils' require 'fakeweb' # override the default hcl dir -FileUtils.mkdir_p __dir__+"/dot_hcl" -FileUtils.touch __dir__+"/dot_hcl/config.yml" -FileUtils.touch __dir__+"/dot_hcl/settings.yml" ENV['HCL_DIR'] = __dir__+"/dot_hcl" require 'hcl' |
