Guest User

Untitled

a guest
Jan 22nd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. class Example
  2. attr_reader :context_name
  3.  
  4. def initialize(context_name, &block)
  5. @context_name = context_name
  6. instance_eval &block
  7. end
  8.  
  9. def expect(result)
  10. self
  11. end
  12.  
  13. def to(expectation)
  14. self
  15. end
  16.  
  17. def eq(expectation)
  18.  
  19. end
  20. end
  21.  
  22. describe NumberService do
  23. describe '#number' do
  24. it 'returns 12' do
  25. expect(NumberService.new.number).to eq(12)
  26. end
  27. end
  28. end
Add Comment
Please, Sign In to add comment