mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
Add xml output for epp_request in specs
This commit is contained in:
parent
4615e99527
commit
d95224cf9c
3 changed files with 44 additions and 2 deletions
22
spec/support/epp_doc.rb
Normal file
22
spec/support/epp_doc.rb
Normal file
|
@ -0,0 +1,22 @@
|
|||
class EppDoc
|
||||
RSpec::Core::Formatters.register self, :example_started, :example_passed, :example_failed
|
||||
|
||||
def initialize(output)
|
||||
@output = output
|
||||
end
|
||||
|
||||
def example_started(notification)
|
||||
desc = notification.example.full_description
|
||||
@output.puts '-' * desc.length
|
||||
@output.puts desc
|
||||
@output.puts '-' * desc.length
|
||||
end
|
||||
|
||||
def example_passed(_example)
|
||||
@output << "\n\n"
|
||||
end
|
||||
|
||||
def example_failed(_example)
|
||||
@output << "\n\n"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue