Adapter Tests
Learn to add the test for the adapter, make the test pass, and learn how VCR performs.
We'll cover the following...
Adapter tests
The adapter tests work between the adapter and the server, using VCR as a medium:
secret_key_base_development
Not Specified...
twitter_api_key
Not Specified...
twitter_api_secret
Not Specified...
secret_key_base_test
Not Specified...
twitter_handle
Not Specified...
shared: api_key: 123 development: secret_key_base: {{secret_key_base_development}} test: secret_key_base: {{secret_key_base_test}} twitter_api_key: "{{twitter_api_key}}" twitter_api_secret: "{{twitter_api_secret}}" production: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
Adding "AvatarAdapter" block to avatar_adapter_spec.rb file in spec/models/ directory
This test has no dependency on the client, which is shown passing in a double rather than an actual User
instance. Using a VCR cassette, we create a new adapter and assert that the adapter provides the expected URL when queried. The test also doesn’t have a particular ...