title: Rails Minitest API connection - NoMethodError: undefined method `call'
body: <p>I want to create a Minitest for service responsible for creating data inside of external provider and updating few things in my db. To do so I'm using VCR and below test:</p>
  <pre><code>#test/services/identity_checks/check_creator_test.rb
  
  require 'test_helper'
  
  module IdentityChecks
    class CheckCreator &lt; ActiveSupport::TestCase
      setup do
        VCR.insert_cassette name
        identity_check.user_id = user.id
      end
      
      teardown do
        VCR.eject_cassette
      end
      
      test 'update status' do
        service
        identity_check.reload
        assert_equal 'Not started', identity_check.status
      end
      
      private
      
      def service
        ::CheckCreator.new(identity_check).call
      end
      
      def identity_check
        @identity_check ||= identity_checks(:in_progress)
      end
      
      def user
        @user ||= users(:registered)
      end
    end  
  end
  </code></pre>
  <p>And tested service:</p>
  <pre><code>#app/services/identity_checks/check_creator.rb
  
  module IdentityChecks
    class CheckCreator
      def initialize(identity_check)
        @identity_check = identity_check
      end
      
      def call
        response = api.create_check(options: build_options)
        identity_check.update!(check_uuid: response['id'], status: response['status_label'], check_body: response)
      end
      
      attr_accessor :identity_check
      
      private
      
      def api
        @api ||= ::Identity::Api.new
      end
    end
  end
  </code></pre>
  <p>With this code I'm getting an error:</p>
  <blockquote>
  <p>NoMethodError: undefined method <code>call' for #&lt;IdentityChecks::CheckCreator test/services/identity_checks/check_creator_test.rb:31:in </code>service'
  test/services/identity_checks/check_creator_test.rb:23:in `block in class:CheckCreator'</p>
  </blockquote>
  <p>I thought it's because VCR but when I get rid of it it's still the same. Inside of Rails console everything works well.</p>