gimme 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/Gemfile +3 -2
  2. data/Guardfile +1 -2
  3. data/LICENSE.txt +1 -1
  4. data/README.markdown +1 -1
  5. data/VERSION +1 -1
  6. data/features/basics.feature +66 -0
  7. data/features/matchers.feature +126 -0
  8. data/features/{argument_captors.feature → old/argument_captors.feature} +0 -0
  9. data/features/{gimme_next.feature → old/gimme_next.feature} +0 -0
  10. data/features/{stub_basic.feature → old/stub_basic.feature} +0 -0
  11. data/features/{stub_class_methods.feature → old/stub_class_methods.feature} +0 -1
  12. data/features/{stub_matchers.feature → old/stub_matchers.feature} +0 -0
  13. data/features/{stub_sensible_defaults.feature → old/stub_sensible_defaults.feature} +0 -0
  14. data/features/{unknown_methods.feature → old/unknown_methods.feature} +0 -0
  15. data/features/{verify_matcher_anything.feature → old/verify_matcher_anything.feature} +0 -0
  16. data/features/old/verify_no_args.feature +23 -0
  17. data/features/{verify_with_args.feature → old/verify_with_args.feature} +0 -0
  18. data/features/readme.md +3 -0
  19. data/features/step_definitions/doc_steps.rb +12 -0
  20. data/features/step_definitions/gimme_steps.rb +17 -0
  21. data/features/support/animals.rb +9 -0
  22. data/gimme.gemspec +35 -18
  23. data/lib/gimme.rb +8 -1
  24. data/lib/gimme/dsl.rb +19 -5
  25. data/lib/gimme/ensures_class_method_restoration.rb +18 -0
  26. data/lib/gimme/gives.rb +1 -2
  27. data/lib/gimme/gives_class_methods.rb +5 -29
  28. data/lib/gimme/invocation_store.rb +14 -0
  29. data/lib/gimme/invokes_satisfied_stubbing.rb +18 -10
  30. data/lib/gimme/method_store.rb +21 -0
  31. data/lib/gimme/reset.rb +10 -3
  32. data/lib/gimme/resolves_methods.rb +1 -1
  33. data/lib/gimme/spies_on_class_methods.rb +28 -0
  34. data/lib/gimme/store.rb +38 -0
  35. data/lib/gimme/stubbing_store.rb +17 -0
  36. data/lib/gimme/test_double.rb +13 -10
  37. data/lib/gimme/verifies.rb +10 -6
  38. data/lib/gimme/verifies_class_methods.rb +8 -0
  39. data/spec/gimme/shared_examples/shared_gives_examples.rb +28 -26
  40. data/spec/gimme/shared_examples/shared_verifies_examples.rb +91 -0
  41. data/spec/gimme/spies_on_class_method_spec.rb +58 -0
  42. data/spec/gimme/verifies_class_methods_spec.rb +46 -0
  43. data/spec/gimme/verifies_spec.rb +7 -94
  44. metadata +59 -42
  45. data/features/verify_no_args.feature +0 -18
@@ -1,18 +0,0 @@
1
- Feature: verification of no-arg methods
2
-
3
- As a test author
4
- I want to verify my test double's no-arg method was invoked
5
- So that I can specify its behavior
6
-
7
- Scenario:
8
- Given a new test double
9
- But I do not invoke to_s
10
- Then verifying to_s raises a Gimme::Errors::VerificationFailedError
11
- But I can verify to_s has been invoked 0 times
12
-
13
- When I invoke to_s
14
- Then I can verify to_s has been invoked
15
- And I can verify to_s has been invoked 1 time
16
-
17
- When I invoke to_s
18
- Then I can verify to_s has been invoked 2 times