diff options
| author | Teddy Wing | 2018-01-31 20:24:14 +0100 |
|---|---|---|
| committer | Teddy Wing | 2018-01-31 20:30:13 +0100 |
| commit | bf1c536b08aa89f59b8b1303f1ce4cd7b32907cc (patch) | |
| tree | e5e80ac20dc8f5d840697756e4269926ba32f47e | |
| parent | 69285540c46480b8ea46edc46222219e713c264e (diff) | |
| download | hcl-bf1c536b08aa89f59b8b1303f1ce4cd7b32907cc.tar.bz2 | |
Commands#start: Remove date argument
I had added the 'date' argument because I wanted it for the `log`
command, which delegates to `#start`, but now have put that directly in
`#log`. As such, it's no longer needed here and the method can be
reverted back to what it was before.
| -rw-r--r-- | lib/hcl/commands.rb | 2 | ||||
| -rw-r--r-- | test/command_test.rb | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/lib/hcl/commands.rb b/lib/hcl/commands.rb index 75cfac6..7c2eac8 100644 --- a/lib/hcl/commands.rb +++ b/lib/hcl/commands.rb @@ -106,14 +106,12 @@ module HCl end def start *args - date = get_date(args) starting_time = get_starting_time args task = get_task args if task.nil? fail "Unknown task alias, try one of the following: ", aliases.join(', ') end timer = task.start http, - :spent_at => date, :starting_time => starting_time, :note => args.join(' ') "Started timer for #{timer} (at #{current_time})" diff --git a/test/command_test.rb b/test/command_test.rb index d4a9bc8..8536286 100644 --- a/test/command_test.rb +++ b/test/command_test.rb @@ -87,7 +87,7 @@ class CommandTest < HCl::TestCase project: HCl::Project.new(id:456, name:'App', client:'Bob', code:'b') ) HCl::Task.expects(:find).with('456','123').returns(task) - task.expects(:start).with(http, spent_at:nil, starting_time:nil, note:'do stuff') + task.expects(:start).with(http, starting_time:nil, note:'do stuff') start *%w[ 456 123 do stuff ] end |
