Guest User

Untitled

a guest
Oct 24th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. # put this file to spec/support/
  2. module RSpec
  3. module Core
  4. class ExampleGroup
  5. def self.Then(*args, &block)
  6. args[0] = "Then #{args[0]}" if args[0].is_a?(String)
  7. it(*args, &block)
  8. end
  9.  
  10. def self.Given(*args, &block)
  11. args[0] = "Given #{args[0]}" if args[0].is_a?(String)
  12. describe(*args, &block)
  13. end
  14.  
  15. def self.When(*args, &block)
  16. args[0] = "When #{args[0]}" if args[0].is_a?(String)
  17. describe(*args, &block)
  18. end
  19.  
  20. def self.Scenario(*args, &block)
  21. args[0] = "Scenario: #{args[0]}" if args[0].is_a?(String)
  22. describe(*args, &block)
  23. end
  24.  
  25. def self.feature(*args, &block)
  26. args[0] = "Feature: #{args[0]}" if args[0].is_a?(String)
  27. describe(*args, &block)
  28. end
  29. end
  30. end
  31. end
Add Comment
Please, Sign In to add comment