spec/unit/models/execution_spec.rb in gooddata-0.6.49 vs spec/unit/models/execution_spec.rb in gooddata-0.6.50

- old
+ new

@@ -1,27 +1,28 @@ # encoding: UTF-8 # -# Copyright (c) 2010-2015 GoodData Corporation. All rights reserved. +# Copyright (c) 2010-2017 GoodData Corporation. All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. require 'gooddata/models/schedule' describe GoodData::Execution do - before(:each) do - @data = {"execution"=> - {"startTime"=>"2015-02-27T15:44:21.759Z", - "endTime"=>"2015-02-27T15:47:49.383Z", - "log"=> - "/gdc/projects/tk3b994vmdpcb0xjwexc9moen8t5bpiw/dataload/processes/2b031451-b1a2-4039-8e36-0672542a0e60/executions/54f090d5e4b0c9cbdcb0f45b/log", - "status"=>"OK", - "trigger"=>"MANUAL", - "links"=> - {"self"=> - "/gdc/projects/tk3b994vmdpcb0xjwexc9moen8t5bpiw/schedules/54f08d1de4b0c9cbdcb0f323/executions/54f090d5e4b0c9cbdcb0f45b"}, - "createdTime"=>"2015-02-27T15:44:21.361Z"}} + @data = { + "execution" => { + "startTime" => "2015-02-27T15:44:21.759Z", + "endTime" => "2015-02-27T15:47:49.383Z", + "log" => "/gdc/projects/tk3b994vmdpcb0xjwexc9moen8t5bpiw/dataload/processes/2b031451-b1a2-4039-8e36-0672542a0e60/executions/54f090d5e4b0c9cbdcb0f45b/log", + "status" => "OK", + "trigger" => "MANUAL", + "links" => { + "self" => "/gdc/projects/tk3b994vmdpcb0xjwexc9moen8t5bpiw/schedules/54f08d1de4b0c9cbdcb0f323/executions/54f090d5e4b0c9cbdcb0f45b" + }, + "createdTime" => "2015-02-27T15:44:21.361Z" + } + } @execution = GoodData::Execution.new(@data) end describe '#created' do it 'returns created as a Time instance' do @@ -30,11 +31,11 @@ end end describe '#error?' do it 'returns true if executione errored out' do - expect(@execution.error?).to be_falsy + expect(@execution.error?).to be_falsey end end describe '#ok?' do it 'returns true if executione finished ok' do @@ -62,10 +63,10 @@ end end describe '#running?' do it 'returns false if executione is already finished' do - expect(@execution.running?).to be_falsy + expect(@execution.running?).to be_falsey end it 'returns true if executione is currently finished' do @data['execution']['status'] = 'RUNNING' running_execution = GoodData::Execution.new(@data)