Sha256: 533548ac6d337cc2b4c7a941d9fb7054f13c34830798b2fc026e8c4939897aec
Contents?: true
Size: 589 Bytes
Versions: 7
Compression:
Stored size: 589 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
7 entries across 7 versions & 1 rubygems