Sha256: ac5a7ffe14c57d846e25198d0b5da44678d75969df35202fbe4e80a21344109d

Contents?: true

Size: 687 Bytes

Versions: 6

Compression:

Stored size: 687 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module RSpec
    module Helpers
      module StubService
        def stub_service(...)
          Classes::StubService.call(...)
        end

        def return_result(status)
          Classes::StubService::Entities::ResultSpec.new(status: status)
        end

        def return_success
          Classes::StubService::Entities::ResultSpec.new(status: :success)
        end

        def return_failure
          Classes::StubService::Entities::ResultSpec.new(status: :failure)
        end

        def return_error
          Classes::StubService::Entities::ResultSpec.new(status: :error)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
convenient_service-0.19.1 lib/convenient_service/rspec/helpers/stub_service.rb
convenient_service-0.19.0 lib/convenient_service/rspec/helpers/stub_service.rb
convenient_service-0.18.0 lib/convenient_service/rspec/helpers/stub_service.rb
convenient_service-0.17.0 lib/convenient_service/rspec/helpers/stub_service.rb
convenient_service-0.16.0 lib/convenient_service/rspec/helpers/stub_service.rb
convenient_service-0.15.0 lib/convenient_service/rspec/helpers/stub_service.rb