Sha256: f3f02e671a93fa0fcb96ebd3cccacec8bc289161d2aa288e730f06dd639f9061
Contents?: true
Size: 726 Bytes
Versions: 5
Compression:
Stored size: 726 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper' require 'taskwarrior-web/command_builders/v1' require 'taskwarrior-web/command' require 'ostruct' describe TaskwarriorWeb::CommandBuilder::V1 do describe '#substitute_parts' do before do TaskwarriorWeb::Command.class_eval do |class_name| include TaskwarriorWeb::CommandBuilder::V1 end @command = TaskwarriorWeb::Command.new(:complete, 34588) end it 'should replace the :id string with the given task ID' do TaskwarriorWeb::Task.should_receive(:query).and_return([OpenStruct.new(:uuid => 34588)]) @command.task_command @command.substitute_parts @command.command_string.should eq('1 done') end end end
Version data entries
5 entries across 5 versions & 1 rubygems