Permalink
Browse files

Move Client configs before VCR configs

  • Loading branch information...
1 parent b5d2668 commit 379fcb092950f17312cb654bd5202d08c191e12b @weppos weppos committed Sep 24, 2012
Showing with 8 additions and 7 deletions.
  1. +8 −7 spec/spec_helper.rb
View
@@ -6,6 +6,14 @@
$:.unshift(File.dirname(__FILE__) + '/lib')
require 'dnsimple'
+config = YAML.load_file(File.expand_path(ENV['DNSIMPLE_TEST_CONFIG'] || '~/.dnsimple.test'))
+
+DNSimple::Client.base_uri = config['site'] if config['site'] # Example: https://test.dnsimple.com/
+DNSimple::Client.host = config['host'] if config['host'] # Example: test.dnsimple.com
+DNSimple::Client.username = config['username'] # Example: testusername@example.com
+DNSimple::Client.password = config['password'] # Example: testpassword
+DNSimple::Client.api_token = config['api_token'] # Example: 1234567890
+
VCR.configure do |c|
c.cassette_library_dir = 'fixtures/vcr_cassettes'
c.hook_into :fakeweb
@@ -17,10 +25,3 @@
c.mock_framework = :mocha
c.extend VCR::RSpec::Macros
end
-
-config = YAML.load_file(File.expand_path(ENV['DNSIMPLE_TEST_CONFIG'] || '~/.dnsimple.test'))
-
-DNSimple::Client.base_uri = config['site'] if config['site'] # Example: https://test.dnsimple.com/
-DNSimple::Client.host = config['host'] if config['host'] # Example: test.dnsimple.com
-DNSimple::Client.username = config['username'] # Example: testusername
-DNSimple::Client.password = config['password'] # Example: testpassword

0 comments on commit 379fcb0

Please sign in to comment.