Permalink
Browse files

all tests are working without internet enabled

  • Loading branch information...
1 parent 45c2a4b commit 27ad8c0f209ba7f5fa64c4c9d547f211bdef4c4e TheNotary committed Jul 24, 2012
Showing with 11 additions and 10 deletions.
  1. +10 −9 spec/integration/ssh_spec.rb
  2. +1 −1 spec/spec_helper.rb
@@ -282,15 +282,16 @@
Gas::Ssh.stub!(:user_wants_gas_to_handle_rsa_keys?).and_return(true)
Gas::Ssh.stub!(:user_wants_to_use_key_already_in_ssh?).and_return(false)
Gas::Ssh.stub!(:user_wants_to_install_key_to_github?).and_return(true)
-
- lambda do
- Gas.add(@nickname,@name,@email)
- end.should change{`ls ~/.gas -1 | wc -l`.to_i}.by(2)
-
- lambda do
- Gas.delete(@nickname)
- end.should change{`ls ~/.gas -1 | wc -l`.to_i}.by(-2)
-
+
+ VCR.use_cassette('add-on-crteation-delete-on-deletion') do
+ lambda do
+ Gas.add(@nickname,@name,@email)
+ end.should change{`ls ~/.gas -1 | wc -l`.to_i}.by(2)
+
+ lambda do
+ Gas.delete(@nickname)
+ end.should change{`ls ~/.gas -1 | wc -l`.to_i}.by(-2)
+ end
Gas::Ssh.unstub!(:user_wants_to_delete_all_ssh_data?)
Gas::Ssh.unstub!(:user_wants_gas_to_handle_rsa_keys?)
View
@@ -10,7 +10,7 @@
require 'vcr'
VCR.configure do |c|
- c.allow_http_connections_when_no_cassette = true
+ #c.allow_http_connections_when_no_cassette = true
c.cassette_library_dir = 'fixtures/vcr_cassettes'
c.hook_into :webmock # or :fakeweb
end

0 comments on commit 27ad8c0

Please sign in to comment.