Skip to content

Commit

Permalink
Transpec changes to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
petems committed Jun 27, 2017
1 parent 579f0b3 commit bbd6b0e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spec/cli/destroy_cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
with(headers: { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization' => 'Bearer foo', 'Content-Type' => 'application/json', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(status: 200, body: fixture('show_droplets'), headers: {})

$stdin.should_receive(:gets).and_return('n')
expect($stdin).to receive(:gets).and_return('n')

expect { cli.destroy('example.com') }.to raise_error(SystemExit)

Expand Down
2 changes: 1 addition & 1 deletion spec/cli/info_cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
with(headers: { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization' => 'Bearer foo', 'Content-Type' => 'application/json', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(status: 200, body: fixture('show_droplet'), headers: {})

$stdin.should_receive(:gets).and_return('0')
expect($stdin).to receive(:gets).and_return('0')

cli.info('examp')

Expand Down
2 changes: 1 addition & 1 deletion spec/cli/info_image_cli_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
with(headers: { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Authorization' => 'Bearer foo', 'Content-Type' => 'application/json', 'User-Agent' => 'Faraday v0.9.2' }).
to_return(status: 200, body: fixture('ubuntu_image_9801951'), headers: {})

$stdin.should_receive(:gets).and_return('0')
expect($stdin).to receive(:gets).and_return('0')

cli.info_image('ubun')

Expand Down
4 changes: 2 additions & 2 deletions spec/middleware/inject_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
it 'loads the client into the environment' do
described_class.new(app).call(env)

env['barge'].should be_a Barge::Client
expect(env['barge']).to be_a Barge::Client
end

it 'creates a client with values from config file' do
Barge::Client.should_receive(:new).with(hash_including(access_token: 'foo'))
expect(Barge::Client).to receive(:new).with(hash_including(access_token: 'foo'))

described_class.new(app).call(env)
end
Expand Down

0 comments on commit bbd6b0e

Please sign in to comment.