test/lib/troo/cli/commands/refresh/all_test.rb in troo-0.0.9 vs test/lib/troo/cli/commands/refresh/all_test.rb in troo-0.0.10
- old
+ new
@@ -1,20 +1,15 @@
require_relative '../../../../../test_helper'
module Troo
module Commands
describe RefreshAll do
- def load_mock_trello_response
- json = File.read('./test/support/remotes/board.json')
- hash = Yajl::Parser.parse(json)
- Troo::Remote::Board.new(hash)
- end
let(:described_class) { RefreshAll }
- let(:resource) { [load_mock_trello_response] }
-
- before do
- Retrieval::Remote.stubs(:fetch).returns(resource)
+ let(:resource) do
+ [mock_trello_response('board_200.json', Troo::Remote::Board)]
end
+
+ before { Retrieval::Remote.stubs(:fetch).returns(resource) }
describe '.dispatch' do
subject { described_class.dispatch }
context 'when all the resources are refreshed' do