• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rspec / rspec-mocks
97%
master: 63%

Build:
Build:
LAST BUILD BRANCH: use-method-handle-for-from-support
DEFAULT BRANCH: master
Repo Added 05 Jun 2013 05:46AM UTC
Files 44
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH reapply_243_onto_master
branch: reapply_243_onto_master
CHANGE BRANCH
x
Reset
  • reapply_243_onto_master
  • 2-99-maintenance
  • 3-3-maintenance
  • 384_stubbing_with_prepend
  • add-symbol-vs-string-specs
  • add_spec_for_nullness_not_persisting
  • address_warnings
  • allow_message_api
  • and_wrap_original
  • any_instance-combine-features
  • any_instance_resetting
  • changelog-tidy
  • coveralls_tweaks
  • experimental_travis
  • extend_verifying_doubles_api
  • faster_jruby_builds
  • feature_for_allow
  • features_for_expect_any_instance_of.feature
  • fix-issue-549-for-2-99
  • fix_any_instance_and_call_orignal
  • fix_for_jruby_builds
  • fix_jruby
  • fix_lambda_stub
  • fix_ordering_regression
  • fixup_warnings_and_deprecations
  • get_original_method_early
  • get_original_method_early_slightly_optimized
  • handle_receive_do_end_block_chaining
  • improve_travis_build
  • issue-377
  • issue-391
  • issue_393
  • issue_393_revisited
  • master
  • move_caller_filter
  • new-deprecation-api
  • new_syntax
  • ordering_spies
  • prevent_errors_on_stub_removal
  • receive-chained-messages
  • receive_messages
  • refactor-references
  • refactor_jruby_fix
  • regression-with-264
  • remove_at_least_0_picked
  • remove_hash_subclassing
  • remove_old_spec_mocks_file
  • revisited_bugfix_for_doubles_in_arrays
  • samphippen/compoasable_argument_matchers
  • samphippen/prevent-expectation-modification
  • switch_to_truthy_matchers
  • switch_to_warnings_from_support
  • syntax_agnostic_message_matchers
  • test-against-other-gems
  • update-travis-build-scripts-2014-11-13-for-master
  • update-travis-build-scripts-2014-12-08-for-master
  • use-method-handle-for-from-support
  • use_git_repos_env
  • use_ruby21
  • v2.99.2
  • warn-allow-klass-any-instance
  • warn_when_overriding_implementation

pending completion
681

push

travis-ci

JonRowe
Clarify relationship between different method stub actions.

In 2.13.0 only `and_yield` and `and_return` could be combined, since
that was the only combination case that was specified by an example.
This was a regression, as reported by a user in #230.

I tried here to fully specify all of the various combinations of stub 
actions. Notes:

* `and_return`, `and_raise` and `and_throw` are "terminal" actions
  in the sense that they terminate the method. They _must_ happen last
  and it is impossible to support more than one of these. Hence, we allow
  only one of these, and allow them to be overridden. We also return `nil`
  from these methods to discourage further stub configuration.
* `and_call_original` is a special case that doesn't make sense to be
  combined with any of the others. Once you've set it up, this causes
  any further instructions to raise an error.
* `and_yield` is treated as an "initial" action. Yielding doesn't exit
  a method the way the terminal actions do. It is the only initial action.
  Calling it multiple times sets up multiple yields.
* Setting a block implementation (possible by passing a block to almost
  any method on the fluent interface) sets the block as the "inner" action.
  It runs between the configured yields (if there are any) and the configured
  terminal action (if there is one). My thinking here is that in many cases,
  users use a block implementation to specify a return value, essentially
  making it like a terminal action (so it should come after the `and_yield`
  actions), but in other cases, the user may just use a block for a side
  effect, and may configure an terminal action as well. Only one block
  implementation is supported and it can be overridden.

1637 of 1683 relevant lines covered (97.27%)

387.39 hits per line

Relevant lines Covered
Build:
Build:
1683 RELEVANT LINES 1637 COVERED LINES
387.39 HITS PER LINE
Source Files on reapply_243_onto_master
  • List 0
  • Changed 27
  • Source Changed 4
  • Coverage Changed 24
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
681 reapply_243_onto_master Clarify relationship between different method stub actions. In 2.13.0 only `and_yield` and `and_return` could be combined, since that was the only combination case that was specified by an example. This was a regression, as reported by a user in ... push 20 Jun 2013 12:42PM UTC JonRowe travis-ci pending completion  
669 reapply_243_onto_master install bundler before travis run push 19 Jun 2013 12:42PM UTC JonRowe travis-ci pending completion  
658 reapply_243_onto_master Clarify relationship between different method stub actions. In 2.13.0 only `and_yield` and `and_return` could be combined, since that was the only combination case that was specified by an example. This was a regression, as reported by a user in ... push 18 Jun 2013 03:55PM UTC myronmarston travis-ci pending completion  
See All Builds (576)
  • Repo on GitHub
  • CI Project
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc