Sha256: 9c83bea8ff54a26065a844ee25b9981d595f5ed4505875e1b309e5cf52868523
Contents?: true
Size: 591 Bytes
Versions: 4
Compression:
Stored size: 591 Bytes
Contents
require 'spec_helper' RSpec.describe SimCtl::Executor do describe '#execute' do it 'raises an exception' do expect { SimCtl::Executor.execute(['xcrun simctl asdf']) }.to raise_error RuntimeError end it 'returns json' do json = SimCtl::Executor.execute(["echo '{\"foo\":\"bar\"}'"]) do |result| result end expect(json).to eql({'foo' => 'bar'}) end it 'returns a string' do string = SimCtl::Executor.execute(["echo 'hello world'"]) do |result| result end expect(string).to eql('hello world') end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
simctl-1.6.2 | spec/simctl/executor_spec.rb |
simctl-1.6.1 | spec/simctl/executor_spec.rb |
simctl-1.6.0 | spec/simctl/executor_spec.rb |
simctl-1.5.8 | spec/simctl/executor_spec.rb |