diff --git a/spec/deploy_spec.rb b/spec/deploy_spec.rb index 735fa77..60b590a 100644 --- a/spec/deploy_spec.rb +++ b/spec/deploy_spec.rb @@ -47,18 +47,16 @@ end it "should call curl with correct bulld paths" do - Xcode::Shell.should_receive(:execute) do |arg| - arg.is_a? Xcode::Shell::Command - arg.cmd.should == 'curl' - arg.args.should include('-F file=@"ipa path"') - arg.args.should include('-F dsym=@"dsym path"') - arg.args.should include("-F api_token='api token'") - arg.args.should include("-F team_token='team token'") - - ['{"response":"ok"}'] + PTY.stub(:spawn).with do |cmd, &block| + cmd.should =~/^curl/ + cmd.should =~/-F file=@"ipa path"/ + cmd.should =~/-F dsym=@"dsym path"/ + cmd.should =~/-F api_token='api token'/ + cmd.should =~/-F team_token='team token'/ end - response = testflight.deploy - response['response'].should == 'ok' + + testflight.deploy + # response['response'].should == 'ok' end end