Module: ConvenientService::RSpec::Helpers::StubService
- Defined in:
- lib/convenient_service/rspec/helpers/stub_service.rb
Instance Method Summary collapse
- #return_error ⇒ Object
- #return_failure ⇒ Object
- #return_result(status) ⇒ Object
- #return_success ⇒ Object
- #stub_service ⇒ Object
Instance Method Details
#return_error ⇒ Object
23 24 25 |
# File 'lib/convenient_service/rspec/helpers/stub_service.rb', line 23 def return_error Classes::StubService::Entities::ResultSpec.new(status: :error) end |
#return_failure ⇒ Object
19 20 21 |
# File 'lib/convenient_service/rspec/helpers/stub_service.rb', line 19 def return_failure Classes::StubService::Entities::ResultSpec.new(status: :failure) end |
#return_result(status) ⇒ Object
11 12 13 |
# File 'lib/convenient_service/rspec/helpers/stub_service.rb', line 11 def return_result(status) Classes::StubService::Entities::ResultSpec.new(status: status) end |
#return_success ⇒ Object
15 16 17 |
# File 'lib/convenient_service/rspec/helpers/stub_service.rb', line 15 def return_success Classes::StubService::Entities::ResultSpec.new(status: :success) end |
#stub_service ⇒ Object
7 8 9 |
# File 'lib/convenient_service/rspec/helpers/stub_service.rb', line 7 def stub_service(...) Classes::StubService.call(...) end |