tuktuk-rails 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tasks/tuktuk_tasks.rake +0 -1
- data/lib/tuktuk/version.rb +1 -1
- data/{app → vendor}/assets/javascripts/index.js +0 -0
- data/{app → vendor}/assets/javascripts/tuktuk/tuktuk.js +0 -0
- data/{app → vendor}/assets/stylesheets/index.css +0 -0
- data/{app → vendor}/assets/stylesheets/tuktuk/tuktuk.css +0 -0
- data/{app → vendor}/assets/stylesheets/tuktuk/tuktuk.icons.css +0 -0
- data/{app → vendor}/assets/stylesheets/tuktuk/tuktuk.theme.css +0 -0
- data/vendor/bundle/ruby/2.0.0/bin/autospec +23 -0
- data/vendor/bundle/ruby/2.0.0/bin/htmldiff +25 -0
- data/vendor/bundle/ruby/2.0.0/bin/ldiff +25 -0
- data/vendor/bundle/ruby/2.0.0/bin/rspec +23 -0
- data/vendor/bundle/ruby/2.0.0/build_info/diff-lcs-1.2.5.info +1 -0
- data/vendor/bundle/ruby/2.0.0/build_info/rspec-2.14.1.info +1 -0
- data/vendor/bundle/ruby/2.0.0/build_info/rspec-core-2.14.7.info +1 -0
- data/vendor/bundle/ruby/2.0.0/build_info/rspec-expectations-2.14.4.info +1 -0
- data/vendor/bundle/ruby/2.0.0/build_info/rspec-mocks-2.14.4.info +1 -0
- data/vendor/bundle/ruby/2.0.0/cache/diff-lcs-1.2.5.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rspec-2.14.1.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rspec-core-2.14.7.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rspec-expectations-2.14.4.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/cache/rspec-mocks-2.14.4.gem +0 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/Contributing.rdoc +64 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/Gemfile +20 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/History.rdoc +152 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/License.rdoc +39 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/Manifest.txt +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/README.rdoc +85 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/Rakefile +41 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/autotest/discover.rb +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/bin/htmldiff +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/bin/ldiff +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/docs/COPYING.txt +339 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/docs/artistic.txt +127 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff-lcs.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs.rb +805 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/array.rb +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/block.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/callbacks.rb +322 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/change.rb +177 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/htmldiff.rb +149 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/hunk.rb +276 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/internals.rb +301 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/ldiff.rb +195 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/lib/diff/lcs/string.rb +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/change_spec.rb +65 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/diff_spec.rb +47 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/hunk_spec.rb +72 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/issues_spec.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/lcs_spec.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/patch_spec.rb +414 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/sdiff_spec.rb +214 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/spec_helper.rb +290 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/traverse_balanced_spec.rb +310 -0
- data/vendor/bundle/ruby/2.0.0/gems/diff-lcs-1.2.5/spec/traverse_sequences_spec.rb +139 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-2.14.1/License.txt +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-2.14.1/README.md +47 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-2.14.1/lib/rspec.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-2.14.1/lib/rspec/version.rb +5 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/Changelog.md +904 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/License.txt +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/README.md +261 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/exe/autospec +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/exe/rspec +25 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/Autotest.md +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/README.md +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/Upgrade.md +364 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/README.md +28 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/example_name_option.feature +97 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/exit_status.feature +82 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/format_option.feature +75 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/init.feature +18 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/line_number_appended_to_path.feature +140 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/line_number_option.feature +58 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/order.feature +29 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/pattern_option.feature +49 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/rake_task.feature +122 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/require_option.feature +43 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/ruby.feature +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/tag.feature +98 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/command_line/warnings_option.feature +29 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/alias_example_to.feature +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/backtrace_clean_patterns.feature +102 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/custom_settings.feature +84 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/default_path.feature +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/deprecation_stream.feature +58 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/fail_fast.feature +77 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/failure_exit_code.feature +36 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/order_and_seed.feature +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/output_stream.feature +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/pattern.feature +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/profile.feature +220 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/read_options_from_file.feature +90 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/run_all_when_everything_filtered.feature +76 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/show_failures_in_pending_blocks.feature +61 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/configuration/treat_symbols_as_metadata_keys_with_true_values.feature +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/example_groups/basic_structure.feature +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/example_groups/shared_context.feature +74 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/example_groups/shared_examples.feature +294 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/expectation_framework_integration/configure_expectation_framework.feature +102 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/filtering/exclusion_filters.feature +138 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/filtering/if_and_unless.feature +168 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/filtering/inclusion_filters.feature +105 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/formatters/configurable_colors.feature +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/formatters/custom_formatter.feature +36 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/formatters/json_formatter.feature +30 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/formatters/text_formatter.feature +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/helper_methods/arbitrary_methods.feature +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/helper_methods/let.feature +50 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/helper_methods/modules.feature +149 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/hooks/around_hooks.feature +343 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/hooks/before_and_after_hooks.feature +427 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/hooks/filtering.feature +234 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/metadata/current_example.feature +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/metadata/described_class.feature +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/metadata/user_defined.feature +113 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/mock_framework_integration/use_any_framework.feature +106 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/mock_framework_integration/use_flexmock.feature +96 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/mock_framework_integration/use_mocha.feature +97 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/mock_framework_integration/use_rr.feature +98 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/mock_framework_integration/use_rspec.feature +97 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/pending/pending_examples.feature +229 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/spec_files/arbitrary_file_suffix.feature +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/step_definitions/additional_cli_steps.rb +49 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/subject/attribute_of_subject.feature +124 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/subject/explicit_subject.feature +101 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/subject/implicit_receiver.feature +29 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/subject/implicit_subject.feature +63 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/support/env.rb +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/features/support/rubinius.rb +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/autotest/discover.rb +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/autotest/rspec2.rb +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/autorun.rb +2 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core.rb +169 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/backtrace_cleaner.rb +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/backward_compatibility.rb +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/command_line.rb +36 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration.rb +1174 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/configuration_options.rb +156 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/deprecation.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/drb_command_line.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/drb_options.rb +87 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/dsl.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example.rb +325 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/example_group.rb +479 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/extensions/instance_eval_with_args.rb +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/extensions/kernel.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/extensions/module_eval_with_args.rb +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/extensions/ordered.rb +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/filter_manager.rb +203 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters.rb +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/base_formatter.rb +246 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/base_text_formatter.rb +329 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/deprecation_formatter.rb +39 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/documentation_formatter.rb +67 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/helpers.rb +110 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/html_formatter.rb +155 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/html_printer.rb +408 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/json_formatter.rb +70 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/progress_formatter.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/snippet_extractor.rb +92 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/formatters/text_mate_formatter.rb +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/hooks.rb +519 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/memoized_helpers.rb +514 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/metadata.rb +299 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/metadata_hash_builder.rb +97 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/mocking/with_absolutely_nothing.rb +11 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/mocking/with_flexmock.rb +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/mocking/with_mocha.rb +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/mocking/with_rr.rb +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/mocking/with_rspec.rb +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/option_parser.rb +219 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/pending.rb +113 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/project_initializer.rb +86 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/rake_task.rb +206 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/reporter.rb +132 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/ruby_project.rb +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/runner.rb +87 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/shared_context.rb +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/shared_example_group.rb +185 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/shared_example_group/collection.rb +43 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/version.rb +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/lib/rspec/core/world.rb +127 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/autotest/discover_spec.rb +19 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/autotest/failed_results_re_spec.rb +45 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/autotest/rspec_spec.rb +133 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/command_line/order_spec.rb +204 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/backtrace_cleaner_spec.rb +68 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/command_line_spec.rb +108 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/command_line_spec_output.txt +0 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/configuration_options_spec.rb +417 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/configuration_spec.rb +1561 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/deprecation_spec.rb +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/deprecations_spec.rb +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/drb_command_line_spec.rb +102 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/drb_options_spec.rb +193 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/dsl_spec.rb +25 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/example_group_spec.rb +1187 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/example_spec.rb +465 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/filter_manager_spec.rb +246 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/base_formatter_spec.rb +108 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/base_text_formatter_spec.rb +494 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/deprecation_formatter_spec.rb +96 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/documentation_formatter_spec.rb +88 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/helpers_spec.rb +104 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.8.7-jruby.html +404 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.8.7-rbx.html +477 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.8.7.html +414 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.9.2.html +425 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.9.3-jruby.html +404 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.9.3-rbx.html +477 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-1.9.3.html +425 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatted-2.0.0.html +425 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/html_formatter_spec.rb +110 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/json_formatter_spec.rb +115 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/progress_formatter_spec.rb +30 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/snippet_extractor_spec.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.8.7-jruby.html +395 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.8.7-rbx.html +477 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.8.7.html +414 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.9.2.html +425 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.9.3-jruby.html +404 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.9.3-rbx.html +477 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-1.9.3.html +425 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatted-2.0.0.html +425 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/formatters/text_mate_formatter_spec.rb +96 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/hooks_filtering_spec.rb +227 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/hooks_spec.rb +267 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/kernel_extensions_spec.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/memoized_helpers_spec.rb +688 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/metadata_spec.rb +491 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/option_parser_spec.rb +242 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/pending_example_spec.rb +220 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/project_initializer_spec.rb +130 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/rake_task_spec.rb +181 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/reporter_spec.rb +141 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/resources/a_bar.rb +0 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/resources/a_foo.rb +0 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/resources/a_spec.rb +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/resources/custom_example_group_runner.rb +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/resources/formatter_specs.rb +60 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/resources/utf8_encoded.rb +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/rspec_matchers_spec.rb +45 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/ruby_project_spec.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/runner_spec.rb +82 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/shared_context_spec.rb +114 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/shared_example_group/collection_spec.rb +70 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/shared_example_group_spec.rb +120 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core/world_spec.rb +142 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/rspec/core_spec.rb +74 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/spec_helper.rb +132 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/config_options_helper.rb +15 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/helper_methods.rb +36 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/in_sub_process.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/isolate_load_path_mutation.rb +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/isolated_directory.rb +10 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/isolated_home_directory.rb +16 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/matchers.rb +65 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/mathn_integration_support.rb +12 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/sandboxed_mock_space.rb +100 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/shared_example_groups.rb +41 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-core-2.14.7/spec/support/spec_files.rb +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/Changelog.md +419 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/License.txt +23 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/README.md +184 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/README.md +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/Upgrade.md +53 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/README.md +90 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/be.feature +175 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/be_within.feature +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/cover.feature +47 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/end_with.feature +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/equality.feature +139 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/exist.feature +45 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/expect_change.feature +59 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/expect_error.feature +144 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/have.feature +109 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/include.feature +174 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/match.feature +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/operators.feature +227 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/predicates.feature +137 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/respond_to.feature +84 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/satisfy.feature +33 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/start_with.feature +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/throw_symbol.feature +91 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/types.feature +116 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/built_in_matchers/yield.feature +161 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/custom_matchers/access_running_example.feature +53 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/custom_matchers/define_diffable_matcher.feature +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/custom_matchers/define_matcher.feature +368 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/custom_matchers/define_matcher_outside_rspec.feature +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/custom_matchers/define_matcher_with_fluent_interface.feature +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/customized_message.feature +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/diffing.feature +85 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/implicit_docstrings.feature +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/step_definitions/additional_cli_steps.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/support/env.rb +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/support/rubinius.rb +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/syntax_configuration.feature +71 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/features/test_frameworks/test_unit.feature +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec-expectations.rb +1 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations.rb +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/deprecation.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/differ.rb +154 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/errors.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/expectation_target.rb +87 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/extensions.rb +2 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/extensions/array.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/extensions/object.rb +29 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/fail_with.rb +79 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/handler.rb +68 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/syntax.rb +164 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/expectations/version.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers.rb +694 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/be_close.rb +9 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in.rb +39 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/base_matcher.rb +68 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/be.rb +197 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/be_instance_of.rb +15 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/be_kind_of.rb +11 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/be_within.rb +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/change.rb +141 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/cover.rb +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/eq.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/eql.rb +23 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/equal.rb +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/exist.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/has.rb +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/have.rb +124 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/include.rb +61 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/match.rb +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/match_array.rb +51 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/raise_error.rb +127 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/respond_to.rb +74 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/satisfy.rb +30 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/start_and_end_with.rb +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/throw_symbol.rb +94 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/built_in/yield.rb +296 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/compatibility.rb +14 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/configuration.rb +108 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/dsl.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/extensions/instance_eval_with_args.rb +39 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/generated_descriptions.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/matcher.rb +300 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/method_missing.rb +12 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/operator_matcher.rb +113 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/pretty.rb +70 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/lib/rspec/matchers/test_unit_integration.rb +11 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/expectations/differ_spec.rb +229 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/expectations/expectation_target_spec.rb +82 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/expectations/extensions/kernel_spec.rb +67 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/expectations/fail_with_spec.rb +114 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/expectations/handler_spec.rb +227 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/expectations/syntax_spec.rb +139 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/expectations_spec.rb +50 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/base_matcher_spec.rb +62 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/be_close_spec.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/be_instance_of_spec.rb +63 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/be_kind_of_spec.rb +41 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/be_spec.rb +522 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/be_within_spec.rb +137 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/change_spec.rb +567 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/configuration_spec.rb +206 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/cover_spec.rb +69 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/description_generation_spec.rb +190 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/dsl_spec.rb +57 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/eq_spec.rb +60 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/eql_spec.rb +41 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/equal_spec.rb +78 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/exist_spec.rb +124 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/has_spec.rb +122 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/have_spec.rb +455 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/include_matcher_integration_spec.rb +30 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/include_spec.rb +531 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/match_array_spec.rb +194 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/match_spec.rb +74 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/matcher_spec.rb +471 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/matchers_spec.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/method_missing_spec.rb +28 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/operator_matcher_spec.rb +252 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/raise_error_spec.rb +535 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/respond_to_spec.rb +292 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/satisfy_spec.rb +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/start_with_end_with_spec.rb +186 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/throw_symbol_spec.rb +116 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/rspec/matchers/yield_spec.rb +514 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/spec_helper.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/support/classes.rb +56 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/support/in_sub_process.rb +38 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/support/matchers.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/support/ruby_version.rb +10 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-expectations-2.14.4/spec/support/shared_examples.rb +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/Changelog.md +420 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/License.txt +23 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/README.md +315 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/README.md +67 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/Scope.md +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/Upgrade.md +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/argument_matchers/README.md +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/argument_matchers/explicit.feature +59 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/argument_matchers/general_matchers.feature +85 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/argument_matchers/type_matchers.feature +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/README.md +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/allow_any_instance_of.feature +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/any_instance.feature +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/block_local_expectations.feature.pending +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/call_original.feature +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/expect_any_instance_of.feature +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/expect_message_using_expect.feature +107 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/expect_message_using_should_receive.feature +118 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/receive_counts.feature +209 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/message_expectations/warn_when_expectation_is_set_on_nil.feature +50 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/method_stubs/README.md +73 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/method_stubs/any_instance.feature +136 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/method_stubs/as_null_object.feature +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/method_stubs/simple_return_value_with_allow.feature +44 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/method_stubs/simple_return_value_with_stub.feature +64 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/method_stubs/stub_chain.feature +51 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/method_stubs/stub_implementation.feature +48 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/method_stubs/to_ary.feature +51 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/mutating_constants/README.md +82 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/mutating_constants/hiding_defined_constant.feature +64 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/mutating_constants/stub_defined_constant.feature +79 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/mutating_constants/stub_undefined_constant.feature +50 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/outside_rspec/configuration.feature +62 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/outside_rspec/standalone.feature +33 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/spies/spy_partial_mock_method.feature +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/spies/spy_pure_mock_method.feature +76 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/spies/spy_unstubbed_method.feature +18 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/step_definitions/additional_cli_steps.rb +11 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/support/env.rb +13 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/support/rubinius.rb +6 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/features/test_frameworks/test_unit.feature +43 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks.rb +96 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/chain.rb +94 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/expectation_chain.rb +42 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/message_chains.rb +60 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/recorder.rb +211 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/stub_chain.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/any_instance/stub_chain_chain.rb +23 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/argument_list_matcher.rb +97 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/argument_matchers.rb +238 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/configuration.rb +55 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/deprecation.rb +18 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/error_generator.rb +179 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/errors.rb +12 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/example_methods.rb +156 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/extensions/instance_exec.rb +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/extensions/marshal.rb +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/framework.rb +34 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/instance_method_stasher.rb +94 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/matchers/have_received.rb +93 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/matchers/receive.rb +97 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/message_expectation.rb +583 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/method_double.rb +271 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/mock.rb +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/mutate_const.rb +403 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/order_group.rb +40 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/proxy.rb +223 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/proxy_for_nil.rb +37 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/space.rb +91 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/standalone.rb +3 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/stub_chain.rb +51 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/syntax.rb +349 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/targets.rb +69 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/test_double.rb +135 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/rspec/mocks/version.rb +7 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/lib/spec/mocks.rb +4 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/and_call_original_spec.rb +243 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/and_yield_spec.rb +127 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/any_instance/message_chains_spec.rb +41 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/any_instance_spec.rb +987 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/any_number_of_times_spec.rb +36 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/argument_expectation_spec.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/at_least_spec.rb +151 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/at_most_spec.rb +90 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/block_return_value_spec.rb +88 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_10260_spec.rb +8 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_10263_spec.rb +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_11545_spec.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_496_spec.rb +17 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_600_spec.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_7611_spec.rb +16 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_8165_spec.rb +31 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_830_spec.rb +21 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/bug_report_957_spec.rb +22 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/combining_implementation_instructions_spec.rb +205 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/configuration_spec.rb +150 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/double_spec.rb +24 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/extensions/marshal_spec.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/failing_argument_matchers_spec.rb +110 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/hash_excluding_matcher_spec.rb +67 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/hash_including_matcher_spec.rb +90 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/instance_method_stasher_spec.rb +58 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/matchers/have_received_spec.rb +266 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/matchers/receive_spec.rb +336 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/methods_spec.rb +27 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/mock_ordering_spec.rb +103 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/mock_space_spec.rb +113 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/mock_spec.rb +798 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/multiple_return_value_spec.rb +132 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/mutate_const_spec.rb +501 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/nil_expectation_warning_spec.rb +68 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/null_object_mock_spec.rb +123 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/once_counts_spec.rb +52 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/options_hash_spec.rb +35 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/partial_mock_spec.rb +205 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/partial_mock_using_mocks_directly_spec.rb +95 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/passing_argument_matchers_spec.rb +142 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/precise_counts_spec.rb +68 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/record_messages_spec.rb +26 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/serialization_spec.rb +89 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/space_spec.rb +32 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/stash_spec.rb +46 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/stub_chain_spec.rb +154 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/stub_implementation_spec.rb +81 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/stub_spec.rb +353 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/stubbed_message_expectations_spec.rb +58 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/syntax_agnostic_message_matchers_spec.rb +81 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/test_double_spec.rb +67 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/to_ary_spec.rb +54 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/twice_counts_spec.rb +66 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks_spec.rb +65 -0
- data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/spec_helper.rb +60 -0
- data/vendor/bundle/ruby/2.0.0/specifications/diff-lcs-1.2.5.gemspec +65 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rspec-2.14.1.gemspec +39 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rspec-core-2.14.7.gemspec +58 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rspec-expectations-2.14.4.gemspec +40 -0
- data/vendor/bundle/ruby/2.0.0/specifications/rspec-mocks-2.14.4.gemspec +37 -0
- metadata +528 -7
data/vendor/bundle/ruby/2.0.0/gems/rspec-mocks-2.14.4/spec/rspec/mocks/and_call_original_spec.rb
ADDED
@@ -0,0 +1,243 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'delegate'
|
3
|
+
|
4
|
+
describe "and_call_original" do
|
5
|
+
context "on a partial mock object" do
|
6
|
+
let(:klass) do
|
7
|
+
Class.new do
|
8
|
+
def meth_1
|
9
|
+
:original
|
10
|
+
end
|
11
|
+
|
12
|
+
def meth_2(x)
|
13
|
+
yield x, :additional_yielded_arg
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.new_instance
|
17
|
+
new
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
let(:instance) { klass.new }
|
23
|
+
|
24
|
+
it 'passes the received message through to the original method' do
|
25
|
+
instance.should_receive(:meth_1).and_call_original
|
26
|
+
expect(instance.meth_1).to eq(:original)
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'passes args and blocks through to the original method' do
|
30
|
+
instance.should_receive(:meth_2).and_call_original
|
31
|
+
value = instance.meth_2(:submitted_arg) { |a, b| [a, b] }
|
32
|
+
expect(value).to eq([:submitted_arg, :additional_yielded_arg])
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'errors when you pass through the wrong number of args' do
|
36
|
+
instance.stub(:meth_1).and_call_original
|
37
|
+
instance.stub(:meth_2).and_call_original
|
38
|
+
expect { instance.meth_1 :a }.to raise_error ArgumentError
|
39
|
+
expect { instance.meth_2 {} }.to raise_error ArgumentError
|
40
|
+
expect { instance.meth_2(:a, :b) {} }.to raise_error ArgumentError
|
41
|
+
end
|
42
|
+
|
43
|
+
context "for singleton methods" do
|
44
|
+
it 'works' do
|
45
|
+
def instance.foo; :bar; end
|
46
|
+
instance.should_receive(:foo).and_call_original
|
47
|
+
expect(instance.foo).to eq(:bar)
|
48
|
+
end
|
49
|
+
|
50
|
+
it 'works for SimpleDelegator subclasses', :if => (RUBY_VERSION.to_f > 1.8) do
|
51
|
+
instance = Class.new(SimpleDelegator).new(1)
|
52
|
+
def instance.foo; :bar; end
|
53
|
+
instance.should_receive(:foo).and_call_original
|
54
|
+
expect(instance.foo).to eq(:bar)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
it 'works for methods added through an extended module' do
|
59
|
+
instance.extend Module.new { def foo; :bar; end }
|
60
|
+
instance.should_receive(:foo).and_call_original
|
61
|
+
expect(instance.foo).to eq(:bar)
|
62
|
+
end
|
63
|
+
|
64
|
+
it "works for method added through an extended module onto a class's ancestor" do
|
65
|
+
sub_sub_klass = Class.new(Class.new(klass))
|
66
|
+
klass.extend Module.new { def foo; :bar; end }
|
67
|
+
sub_sub_klass.should_receive(:foo).and_call_original
|
68
|
+
expect(sub_sub_klass.foo).to eq(:bar)
|
69
|
+
end
|
70
|
+
|
71
|
+
it "finds the method on the most direct ancestor even if the method " +
|
72
|
+
"is available on more distant ancestors" do
|
73
|
+
klass.extend Module.new { def foo; :klass_bar; end }
|
74
|
+
sub_klass = Class.new(klass)
|
75
|
+
sub_klass.extend Module.new { def foo; :sub_klass_bar; end }
|
76
|
+
sub_klass.should_receive(:foo).and_call_original
|
77
|
+
expect(sub_klass.foo).to eq(:sub_klass_bar)
|
78
|
+
end
|
79
|
+
|
80
|
+
context 'when using any_instance' do
|
81
|
+
it 'works for instance methods defined on the class' do
|
82
|
+
klass.any_instance.should_receive(:meth_1).and_call_original
|
83
|
+
expect(klass.new.meth_1).to eq(:original)
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'works for instance methods defined on the superclass of the class' do
|
87
|
+
subclass = Class.new(klass)
|
88
|
+
subclass.any_instance.should_receive(:meth_1).and_call_original
|
89
|
+
expect(subclass.new.meth_1).to eq(:original)
|
90
|
+
end
|
91
|
+
|
92
|
+
it 'works when mocking the method on one class and calling the method on an instance of a subclass' do
|
93
|
+
klass.any_instance.should_receive(:meth_1).and_call_original
|
94
|
+
expect(Class.new(klass).new.meth_1).to eq(:original)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
if RUBY_VERSION.to_f > 1.8
|
99
|
+
it 'works for class methods defined on a superclass' do
|
100
|
+
subclass = Class.new(klass)
|
101
|
+
subclass.should_receive(:new_instance).and_call_original
|
102
|
+
expect(subclass.new_instance).to be_a(subclass)
|
103
|
+
end
|
104
|
+
|
105
|
+
it 'works for class methods defined on a grandparent class' do
|
106
|
+
sub_subclass = Class.new(Class.new(klass))
|
107
|
+
sub_subclass.should_receive(:new_instance).and_call_original
|
108
|
+
expect(sub_subclass.new_instance).to be_a(sub_subclass)
|
109
|
+
end
|
110
|
+
else
|
111
|
+
it 'attempts to work for class methods defined on a superclass but ' +
|
112
|
+
'executes the method with `self` as the superclass' do
|
113
|
+
::Kernel.stub(:warn)
|
114
|
+
subclass = Class.new(klass)
|
115
|
+
subclass.should_receive(:new_instance).and_call_original
|
116
|
+
expect(subclass.new_instance).to be_an_instance_of(klass)
|
117
|
+
end
|
118
|
+
|
119
|
+
it 'prints a warning to notify users that `self` will not be correct' do
|
120
|
+
subclass = Class.new(klass)
|
121
|
+
::Kernel.should_receive(:warn).with(/may not work correctly/)
|
122
|
+
subclass.should_receive(:new_instance).and_call_original
|
123
|
+
subclass.new_instance
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
it 'works for class methods defined on the Class class' do
|
128
|
+
klass.should_receive(:new).and_call_original
|
129
|
+
expect(klass.new).to be_an_instance_of(klass)
|
130
|
+
end
|
131
|
+
|
132
|
+
it "works for instance methods defined on the object's class's superclass" do
|
133
|
+
subclass = Class.new(klass)
|
134
|
+
inst = subclass.new
|
135
|
+
inst.should_receive(:meth_1).and_call_original
|
136
|
+
expect(inst.meth_1).to eq(:original)
|
137
|
+
end
|
138
|
+
|
139
|
+
it 'works for aliased methods' do
|
140
|
+
klass = Class.new do
|
141
|
+
class << self
|
142
|
+
alias alternate_new new
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
klass.should_receive(:alternate_new).and_call_original
|
147
|
+
expect(klass.alternate_new).to be_an_instance_of(klass)
|
148
|
+
end
|
149
|
+
|
150
|
+
context 'on an object that defines method_missing' do
|
151
|
+
before do
|
152
|
+
klass.class_eval do
|
153
|
+
private
|
154
|
+
|
155
|
+
def method_missing(name, *args)
|
156
|
+
if name.to_s == "greet_jack"
|
157
|
+
"Hello, jack"
|
158
|
+
else
|
159
|
+
super
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
it 'works when the method_missing definition handles the message' do
|
166
|
+
instance.should_receive(:greet_jack).and_call_original
|
167
|
+
expect(instance.greet_jack).to eq("Hello, jack")
|
168
|
+
end
|
169
|
+
|
170
|
+
it 'works for an any_instance partial mock' do
|
171
|
+
klass.any_instance.should_receive(:greet_jack).and_call_original
|
172
|
+
expect(instance.greet_jack).to eq("Hello, jack")
|
173
|
+
end
|
174
|
+
|
175
|
+
it 'raises an error for an unhandled message for an any_instance partial mock' do
|
176
|
+
klass.any_instance.should_receive(:not_a_handled_message).and_call_original
|
177
|
+
expect {
|
178
|
+
instance.not_a_handled_message
|
179
|
+
}.to raise_error(NameError, /not_a_handled_message/)
|
180
|
+
end
|
181
|
+
|
182
|
+
it 'raises an error on invocation if method_missing does not handle the message' do
|
183
|
+
instance.should_receive(:not_a_handled_message).and_call_original
|
184
|
+
|
185
|
+
# Note: it should raise a NoMethodError (and usually does), but
|
186
|
+
# due to a weird rspec-expectations issue (see #183) it sometimes
|
187
|
+
# raises a `NameError` when a `be_xxx` predicate matcher has been
|
188
|
+
# recently used. `NameError` is the superclass of `NoMethodError`
|
189
|
+
# so this example will pass regardless.
|
190
|
+
# If/when we solve the rspec-expectations issue, this can (and should)
|
191
|
+
# be changed to `NoMethodError`.
|
192
|
+
expect {
|
193
|
+
instance.not_a_handled_message
|
194
|
+
}.to raise_error(NameError, /not_a_handled_message/)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
context "on a partial mock object that overrides #method" do
|
200
|
+
let(:request_klass) do
|
201
|
+
Struct.new(:method, :url) do
|
202
|
+
def perform
|
203
|
+
:the_response
|
204
|
+
end
|
205
|
+
|
206
|
+
def self.method
|
207
|
+
:some_method
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
|
212
|
+
let(:request) { request_klass.new(:get, "http://foo.com/bar") }
|
213
|
+
|
214
|
+
it 'still works even though #method has been overriden' do
|
215
|
+
request.should_receive(:perform).and_call_original
|
216
|
+
expect(request.perform).to eq(:the_response)
|
217
|
+
end
|
218
|
+
|
219
|
+
it 'works for a singleton method' do
|
220
|
+
def request.perform
|
221
|
+
:a_response
|
222
|
+
end
|
223
|
+
|
224
|
+
request.should_receive(:perform).and_call_original
|
225
|
+
expect(request.perform).to eq(:a_response)
|
226
|
+
end
|
227
|
+
end
|
228
|
+
|
229
|
+
context "on a pure mock object" do
|
230
|
+
let(:instance) { double }
|
231
|
+
|
232
|
+
it 'raises an error even if the mock object responds to the message' do
|
233
|
+
expect(instance.to_s).to be_a(String)
|
234
|
+
mock_expectation = instance.should_receive(:to_s)
|
235
|
+
instance.to_s # to satisfy the expectation
|
236
|
+
|
237
|
+
expect {
|
238
|
+
mock_expectation.and_call_original
|
239
|
+
}.to raise_error(/and_call_original.*partial mock/i)
|
240
|
+
end
|
241
|
+
end
|
242
|
+
end
|
243
|
+
|
@@ -0,0 +1,127 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe RSpec::Mocks::Mock do
|
4
|
+
|
5
|
+
let(:obj) { double }
|
6
|
+
|
7
|
+
describe "#and_yield" do
|
8
|
+
context 'when the method double has been constrained by `with`' do
|
9
|
+
it 'uses the default stub if the provided args do not match' do
|
10
|
+
obj.stub(:foo) { 15 }
|
11
|
+
obj.stub(:foo).with(:yield).and_yield
|
12
|
+
|
13
|
+
# should_receive is required to trigger the bug:
|
14
|
+
# https://github.com/rspec/rspec-mocks/issues/127
|
15
|
+
obj.should_receive(:foo)
|
16
|
+
|
17
|
+
expect(obj.foo(:dont_yield)).to eq(15)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
context "with eval context as block argument" do
|
22
|
+
|
23
|
+
it "evaluates the supplied block as it is read" do
|
24
|
+
evaluated = false
|
25
|
+
obj.stub(:method_that_accepts_a_block).and_yield do |eval_context|
|
26
|
+
evaluated = true
|
27
|
+
end
|
28
|
+
expect(evaluated).to be_true
|
29
|
+
end
|
30
|
+
|
31
|
+
it "passes an eval context object to the supplied block" do
|
32
|
+
obj.stub(:method_that_accepts_a_block).and_yield do |eval_context|
|
33
|
+
expect(eval_context).not_to be_nil
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
it "evaluates the block passed to the stubbed method in the context of the supplied eval context" do
|
38
|
+
expected_eval_context = nil
|
39
|
+
actual_eval_context = nil
|
40
|
+
|
41
|
+
obj.stub(:method_that_accepts_a_block).and_yield do |eval_context|
|
42
|
+
expected_eval_context = eval_context
|
43
|
+
end
|
44
|
+
|
45
|
+
obj.method_that_accepts_a_block do
|
46
|
+
actual_eval_context = self
|
47
|
+
end
|
48
|
+
|
49
|
+
expect(actual_eval_context).to equal(expected_eval_context)
|
50
|
+
end
|
51
|
+
|
52
|
+
context "and no yielded arguments" do
|
53
|
+
|
54
|
+
it "passes when expectations set on the eval context are met" do
|
55
|
+
configured_eval_context = nil
|
56
|
+
obj.stub(:method_that_accepts_a_block).and_yield do |eval_context|
|
57
|
+
configured_eval_context = eval_context
|
58
|
+
configured_eval_context.should_receive(:foo)
|
59
|
+
end
|
60
|
+
|
61
|
+
obj.method_that_accepts_a_block do
|
62
|
+
foo
|
63
|
+
end
|
64
|
+
|
65
|
+
verify configured_eval_context
|
66
|
+
end
|
67
|
+
|
68
|
+
it "fails when expectations set on the eval context are not met" do
|
69
|
+
configured_eval_context = nil
|
70
|
+
obj.stub(:method_that_accepts_a_block).and_yield do |eval_context|
|
71
|
+
configured_eval_context = eval_context
|
72
|
+
configured_eval_context.should_receive(:foo)
|
73
|
+
end
|
74
|
+
|
75
|
+
obj.method_that_accepts_a_block do
|
76
|
+
# foo is not called here
|
77
|
+
end
|
78
|
+
|
79
|
+
expect { verify configured_eval_context }.to raise_error(RSpec::Mocks::MockExpectationError)
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
context "and yielded arguments" do
|
85
|
+
|
86
|
+
it "passes when expectations set on the eval context and yielded arguments are met" do
|
87
|
+
configured_eval_context = nil
|
88
|
+
yielded_arg = Object.new
|
89
|
+
obj.stub(:method_that_accepts_a_block).and_yield(yielded_arg) do |eval_context|
|
90
|
+
configured_eval_context = eval_context
|
91
|
+
configured_eval_context.should_receive(:foo)
|
92
|
+
yielded_arg.should_receive(:bar)
|
93
|
+
end
|
94
|
+
|
95
|
+
obj.method_that_accepts_a_block do |obj|
|
96
|
+
obj.bar
|
97
|
+
foo
|
98
|
+
end
|
99
|
+
|
100
|
+
verify configured_eval_context
|
101
|
+
verify yielded_arg
|
102
|
+
end
|
103
|
+
|
104
|
+
it "fails when expectations set on the eval context and yielded arguments are not met" do
|
105
|
+
configured_eval_context = nil
|
106
|
+
yielded_arg = Object.new
|
107
|
+
obj.stub(:method_that_accepts_a_block).and_yield(yielded_arg) do |eval_context|
|
108
|
+
configured_eval_context = eval_context
|
109
|
+
configured_eval_context.should_receive(:foo)
|
110
|
+
yielded_arg.should_receive(:bar)
|
111
|
+
end
|
112
|
+
|
113
|
+
obj.method_that_accepts_a_block do |obj|
|
114
|
+
# obj.bar is not called here
|
115
|
+
# foo is not called here
|
116
|
+
end
|
117
|
+
|
118
|
+
expect { verify configured_eval_context }.to raise_error(RSpec::Mocks::MockExpectationError)
|
119
|
+
expect { verify yielded_arg }.to raise_error(RSpec::Mocks::MockExpectationError)
|
120
|
+
end
|
121
|
+
|
122
|
+
end
|
123
|
+
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe RSpec::Mocks::AnyInstance::MessageChains do
|
4
|
+
let(:recorder) { double }
|
5
|
+
let(:chains) { RSpec::Mocks::AnyInstance::MessageChains.new }
|
6
|
+
let(:stub_chain) { RSpec::Mocks::AnyInstance::StubChain.new recorder }
|
7
|
+
let(:expectation_chain) { RSpec::Mocks::AnyInstance::PositiveExpectationChain.new recorder }
|
8
|
+
|
9
|
+
it "knows if a method does not have an expectation set on it" do
|
10
|
+
chains.add(:method_name, stub_chain)
|
11
|
+
expect(chains.has_expectation?(:method_name)).to be_false
|
12
|
+
end
|
13
|
+
|
14
|
+
it "knows if a method has an expectation set on it" do
|
15
|
+
chains.add(:method_name, stub_chain)
|
16
|
+
chains.add(:method_name, expectation_chain)
|
17
|
+
expect(chains.has_expectation?(:method_name)).to be_true
|
18
|
+
end
|
19
|
+
|
20
|
+
it "can remove all stub chains" do
|
21
|
+
chains.add(:method_name, stub_chain)
|
22
|
+
chains.add(:method_name, expectation_chain)
|
23
|
+
chains.add(:method_name, RSpec::Mocks::AnyInstance::StubChain.new(recorder))
|
24
|
+
|
25
|
+
chains.remove_stub_chains_for!(:method_name)
|
26
|
+
expect(chains[:method_name]).to eq([expectation_chain])
|
27
|
+
end
|
28
|
+
|
29
|
+
context "creating stub chains" do
|
30
|
+
it "understands how to add a stub chain for a method" do
|
31
|
+
chains.add(:method_name, stub_chain)
|
32
|
+
expect(chains[:method_name]).to eq([stub_chain])
|
33
|
+
end
|
34
|
+
|
35
|
+
it "allows multiple stub chains for a method" do
|
36
|
+
chains.add(:method_name, stub_chain)
|
37
|
+
chains.add(:method_name, another_stub_chain = RSpec::Mocks::AnyInstance::StubChain.new(recorder))
|
38
|
+
expect(chains[:method_name]).to eq([stub_chain, another_stub_chain])
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,987 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'delegate'
|
3
|
+
|
4
|
+
module RSpec
|
5
|
+
module Mocks
|
6
|
+
describe "#any_instance" do
|
7
|
+
class CustomErrorForAnyInstanceSpec < StandardError;end
|
8
|
+
|
9
|
+
let(:klass) do
|
10
|
+
Class.new do
|
11
|
+
def existing_method; :existing_method_return_value; end
|
12
|
+
def existing_method_with_arguments(arg_one, arg_two = nil); :existing_method_with_arguments_return_value; end
|
13
|
+
def another_existing_method; end
|
14
|
+
private
|
15
|
+
def private_method; :private_method_return_value; end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
let(:existing_method_return_value){ :existing_method_return_value }
|
19
|
+
|
20
|
+
context "invocation order" do
|
21
|
+
context "#stub" do
|
22
|
+
it "raises an error if 'stub' follows 'with'" do
|
23
|
+
expect { klass.any_instance.with("1").stub(:foo) }.to raise_error(NoMethodError)
|
24
|
+
end
|
25
|
+
|
26
|
+
it "raises an error if 'with' follows 'and_return'" do
|
27
|
+
expect { klass.any_instance.stub(:foo).and_return(1).with("1") }.to raise_error(NoMethodError)
|
28
|
+
end
|
29
|
+
|
30
|
+
it "raises an error if 'with' follows 'and_raise'" do
|
31
|
+
expect { klass.any_instance.stub(:foo).and_raise(1).with("1") }.to raise_error(NoMethodError)
|
32
|
+
end
|
33
|
+
|
34
|
+
it "raises an error if 'with' follows 'and_yield'" do
|
35
|
+
expect { klass.any_instance.stub(:foo).and_yield(1).with("1") }.to raise_error(NoMethodError)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context "#stub_chain" do
|
40
|
+
it "raises an error if 'stub_chain' follows 'any_instance'" do
|
41
|
+
expect { klass.any_instance.and_return("1").stub_chain(:foo, :bar) }.to raise_error(NoMethodError)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
context "#should_receive" do
|
46
|
+
it "raises an error if 'should_receive' follows 'with'" do
|
47
|
+
expect { klass.any_instance.with("1").should_receive(:foo) }.to raise_error(NoMethodError)
|
48
|
+
end
|
49
|
+
|
50
|
+
it "raises an error if 'with' follows 'and_return'" do
|
51
|
+
pending "see Github issue #42"
|
52
|
+
expect { klass.any_instance.should_receive(:foo).and_return(1).with("1") }.to raise_error(NoMethodError)
|
53
|
+
end
|
54
|
+
|
55
|
+
it "raises an error if 'with' follows 'and_raise'" do
|
56
|
+
pending "see Github issue #42"
|
57
|
+
expect { klass.any_instance.should_receive(:foo).and_raise(1).with("1") }.to raise_error(NoMethodError)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context "with #stub" do
|
63
|
+
it "does not suppress an exception when a method that doesn't exist is invoked" do
|
64
|
+
klass.any_instance.stub(:foo)
|
65
|
+
expect { klass.new.bar }.to raise_error(NoMethodError)
|
66
|
+
end
|
67
|
+
|
68
|
+
context 'multiple methods' do
|
69
|
+
it "allows multiple methods to be stubbed in a single invocation" do
|
70
|
+
klass.any_instance.stub(:foo => 'foo', :bar => 'bar')
|
71
|
+
instance = klass.new
|
72
|
+
expect(instance.foo).to eq('foo')
|
73
|
+
expect(instance.bar).to eq('bar')
|
74
|
+
end
|
75
|
+
|
76
|
+
it "adheres to the contract of multiple method stubbing withou any instance" do
|
77
|
+
expect(Object.new.stub(:foo => 'foo', :bar => 'bar')).to eq(:foo => 'foo', :bar => 'bar')
|
78
|
+
expect(klass.any_instance.stub(:foo => 'foo', :bar => 'bar')).to eq(:foo => 'foo', :bar => 'bar')
|
79
|
+
end
|
80
|
+
|
81
|
+
context "allows a chain of methods to be stubbed using #stub_chain" do
|
82
|
+
it "given symbols representing the methods" do
|
83
|
+
klass.any_instance.stub_chain(:one, :two, :three).and_return(:four)
|
84
|
+
expect(klass.new.one.two.three).to eq(:four)
|
85
|
+
end
|
86
|
+
|
87
|
+
it "given a hash as the last argument uses the value as the expected return value" do
|
88
|
+
klass.any_instance.stub_chain(:one, :two, :three => :four)
|
89
|
+
expect(klass.new.one.two.three).to eq(:four)
|
90
|
+
end
|
91
|
+
|
92
|
+
it "given a string of '.' separated method names representing the chain" do
|
93
|
+
klass.any_instance.stub_chain('one.two.three').and_return(:four)
|
94
|
+
expect(klass.new.one.two.three).to eq(:four)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
context "behaves as 'every instance'" do
|
100
|
+
it "stubs every instance in the spec" do
|
101
|
+
klass.any_instance.stub(:foo).and_return(result = Object.new)
|
102
|
+
expect(klass.new.foo).to eq(result)
|
103
|
+
expect(klass.new.foo).to eq(result)
|
104
|
+
end
|
105
|
+
|
106
|
+
it "stubs instance created before any_instance was called" do
|
107
|
+
instance = klass.new
|
108
|
+
klass.any_instance.stub(:foo).and_return(result = Object.new)
|
109
|
+
expect(instance.foo).to eq(result)
|
110
|
+
end
|
111
|
+
|
112
|
+
it 'handles freeze and duplication correctly' do
|
113
|
+
String.any_instance.stub(:any_method)
|
114
|
+
|
115
|
+
foo = 'foo'.freeze
|
116
|
+
expect(foo.dup.concat 'bar').to eq 'foobar'
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
context "with argument matching" do
|
121
|
+
before do
|
122
|
+
klass.any_instance.stub(:foo).with(:param_one, :param_two).and_return(:result_one)
|
123
|
+
klass.any_instance.stub(:foo).with(:param_three, :param_four).and_return(:result_two)
|
124
|
+
end
|
125
|
+
|
126
|
+
it "returns the stubbed value when arguments match" do
|
127
|
+
instance = klass.new
|
128
|
+
expect(instance.foo(:param_one, :param_two)).to eq(:result_one)
|
129
|
+
expect(instance.foo(:param_three, :param_four)).to eq(:result_two)
|
130
|
+
end
|
131
|
+
|
132
|
+
it "fails the spec with an expectation error when the arguments do not match" do
|
133
|
+
expect do
|
134
|
+
klass.new.foo(:param_one, :param_three)
|
135
|
+
end.to(raise_error(RSpec::Mocks::MockExpectationError))
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
context "with multiple stubs" do
|
140
|
+
before do
|
141
|
+
klass.any_instance.stub(:foo).and_return(1)
|
142
|
+
klass.any_instance.stub(:bar).and_return(2)
|
143
|
+
end
|
144
|
+
|
145
|
+
it "stubs a method" do
|
146
|
+
instance = klass.new
|
147
|
+
expect(instance.foo).to eq(1)
|
148
|
+
expect(instance.bar).to eq(2)
|
149
|
+
end
|
150
|
+
|
151
|
+
it "returns the same value for calls on different instances" do
|
152
|
+
expect(klass.new.foo).to eq(klass.new.foo)
|
153
|
+
expect(klass.new.bar).to eq(klass.new.bar)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
context "with #and_return" do
|
158
|
+
it "stubs a method that doesn't exist" do
|
159
|
+
klass.any_instance.stub(:foo).and_return(1)
|
160
|
+
expect(klass.new.foo).to eq(1)
|
161
|
+
end
|
162
|
+
|
163
|
+
it "stubs a method that exists" do
|
164
|
+
klass.any_instance.stub(:existing_method).and_return(1)
|
165
|
+
expect(klass.new.existing_method).to eq(1)
|
166
|
+
end
|
167
|
+
|
168
|
+
it "returns the same object for calls on different instances" do
|
169
|
+
return_value = Object.new
|
170
|
+
klass.any_instance.stub(:foo).and_return(return_value)
|
171
|
+
expect(klass.new.foo).to be(return_value)
|
172
|
+
expect(klass.new.foo).to be(return_value)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
context "with #and_yield" do
|
177
|
+
it "yields the value specified" do
|
178
|
+
yielded_value = Object.new
|
179
|
+
klass.any_instance.stub(:foo).and_yield(yielded_value)
|
180
|
+
klass.new.foo{|value| expect(value).to be(yielded_value)}
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
context 'with #and_call_original and competing #with' do
|
185
|
+
let(:klass) { Struct.new(:a_method) }
|
186
|
+
|
187
|
+
it 'can combine and_call_original, with, and_return' do
|
188
|
+
allow_any_instance_of(klass).to receive(:a_method).and_call_original
|
189
|
+
allow_any_instance_of(klass).to receive(:a_method).with(:arg).and_return('value')
|
190
|
+
|
191
|
+
expect(klass.new('org').a_method).to eq 'org'
|
192
|
+
expect(klass.new.a_method(:arg)).to eq 'value'
|
193
|
+
end
|
194
|
+
|
195
|
+
it 'can combine and_call_original, with, and_return (old syntax)' do
|
196
|
+
klass.any_instance.stub(:a_method).and_call_original
|
197
|
+
klass.any_instance.stub(:a_method).with(:arg).and_return('value')
|
198
|
+
|
199
|
+
expect(klass.new('org').a_method).to eq 'org'
|
200
|
+
expect(klass.new.a_method(:arg)).to eq 'value'
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
context "with #and_raise" do
|
205
|
+
it "stubs a method that doesn't exist" do
|
206
|
+
klass.any_instance.stub(:foo).and_raise(CustomErrorForAnyInstanceSpec)
|
207
|
+
expect { klass.new.foo}.to raise_error(CustomErrorForAnyInstanceSpec)
|
208
|
+
end
|
209
|
+
|
210
|
+
it "stubs a method that exists" do
|
211
|
+
klass.any_instance.stub(:existing_method).and_raise(CustomErrorForAnyInstanceSpec)
|
212
|
+
expect { klass.new.existing_method}.to raise_error(CustomErrorForAnyInstanceSpec)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
context "with a block" do
|
217
|
+
it "stubs a method" do
|
218
|
+
klass.any_instance.stub(:foo) { 1 }
|
219
|
+
expect(klass.new.foo).to eq(1)
|
220
|
+
end
|
221
|
+
|
222
|
+
it "returns the same computed value for calls on different instances" do
|
223
|
+
klass.any_instance.stub(:foo) { 1 + 2 }
|
224
|
+
expect(klass.new.foo).to eq(klass.new.foo)
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
context "core ruby objects" do
|
229
|
+
it "works uniformly across *everything*" do
|
230
|
+
Object.any_instance.stub(:foo).and_return(1)
|
231
|
+
expect(Object.new.foo).to eq(1)
|
232
|
+
end
|
233
|
+
|
234
|
+
it "works with the non-standard constructor []" do
|
235
|
+
Array.any_instance.stub(:foo).and_return(1)
|
236
|
+
expect([].foo).to eq(1)
|
237
|
+
end
|
238
|
+
|
239
|
+
it "works with the non-standard constructor {}" do
|
240
|
+
Hash.any_instance.stub(:foo).and_return(1)
|
241
|
+
expect({}.foo).to eq(1)
|
242
|
+
end
|
243
|
+
|
244
|
+
it "works with the non-standard constructor \"\"" do
|
245
|
+
String.any_instance.stub(:foo).and_return(1)
|
246
|
+
expect("".foo).to eq(1)
|
247
|
+
end
|
248
|
+
|
249
|
+
it "works with the non-standard constructor \'\'" do
|
250
|
+
String.any_instance.stub(:foo).and_return(1)
|
251
|
+
expect(''.foo).to eq(1)
|
252
|
+
end
|
253
|
+
|
254
|
+
it "works with the non-standard constructor module" do
|
255
|
+
Module.any_instance.stub(:foo).and_return(1)
|
256
|
+
module RSpec::SampleRspecTestModule;end
|
257
|
+
expect(RSpec::SampleRspecTestModule.foo).to eq(1)
|
258
|
+
end
|
259
|
+
|
260
|
+
it "works with the non-standard constructor class" do
|
261
|
+
Class.any_instance.stub(:foo).and_return(1)
|
262
|
+
class RSpec::SampleRspecTestClass;end
|
263
|
+
expect(RSpec::SampleRspecTestClass.foo).to eq(1)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
context "with #stub!" do
|
269
|
+
it "raises with a message instructing the user to use stub instead" do
|
270
|
+
expect do
|
271
|
+
klass.any_instance.stub!(:foo)
|
272
|
+
end.to raise_error(/Use stub instead/)
|
273
|
+
end
|
274
|
+
end
|
275
|
+
|
276
|
+
context "with #unstub!" do
|
277
|
+
it "raises with a message instructing the user to use unstub instead" do
|
278
|
+
expect do
|
279
|
+
klass.any_instance.unstub!(:foo)
|
280
|
+
end.to raise_error(/Use unstub instead/)
|
281
|
+
end
|
282
|
+
end
|
283
|
+
|
284
|
+
context "unstub implementation" do
|
285
|
+
it "replaces the stubbed method with the original method" do
|
286
|
+
klass.any_instance.stub(:existing_method)
|
287
|
+
klass.any_instance.unstub(:existing_method)
|
288
|
+
expect(klass.new.existing_method).to eq(:existing_method_return_value)
|
289
|
+
end
|
290
|
+
|
291
|
+
it "removes all stubs with the supplied method name" do
|
292
|
+
klass.any_instance.stub(:existing_method).with(1)
|
293
|
+
klass.any_instance.stub(:existing_method).with(2)
|
294
|
+
klass.any_instance.unstub(:existing_method)
|
295
|
+
expect(klass.new.existing_method).to eq(:existing_method_return_value)
|
296
|
+
end
|
297
|
+
|
298
|
+
it "removes stubs even if they have already been invoked" do
|
299
|
+
klass.any_instance.stub(:existing_method).and_return(:any_instance_value)
|
300
|
+
obj = klass.new
|
301
|
+
obj.existing_method
|
302
|
+
klass.any_instance.unstub(:existing_method)
|
303
|
+
expect(obj.existing_method).to eq(:existing_method_return_value)
|
304
|
+
end
|
305
|
+
|
306
|
+
it "removes stubs from sub class after invokation when super class was originally stubbed" do
|
307
|
+
klass.any_instance.stub(:existing_method).and_return(:any_instance_value)
|
308
|
+
obj = Class.new(klass).new
|
309
|
+
expect(obj.existing_method).to eq(:any_instance_value)
|
310
|
+
klass.any_instance.unstub(:existing_method)
|
311
|
+
expect(obj.existing_method).to eq(:existing_method_return_value)
|
312
|
+
end
|
313
|
+
|
314
|
+
it "does not remove any stubs set directly on an instance" do
|
315
|
+
klass.any_instance.stub(:existing_method).and_return(:any_instance_value)
|
316
|
+
obj = klass.new
|
317
|
+
obj.stub(:existing_method).and_return(:local_method)
|
318
|
+
klass.any_instance.unstub(:existing_method)
|
319
|
+
expect(obj.existing_method).to eq(:local_method)
|
320
|
+
end
|
321
|
+
|
322
|
+
it "does not remove any expectations with the same method name" do
|
323
|
+
klass.any_instance.should_receive(:existing_method_with_arguments).with(3).and_return(:three)
|
324
|
+
klass.any_instance.stub(:existing_method_with_arguments).with(1)
|
325
|
+
klass.any_instance.stub(:existing_method_with_arguments).with(2)
|
326
|
+
klass.any_instance.unstub(:existing_method_with_arguments)
|
327
|
+
expect(klass.new.existing_method_with_arguments(3)).to eq(:three)
|
328
|
+
end
|
329
|
+
|
330
|
+
it "raises a MockExpectationError if the method has not been stubbed" do
|
331
|
+
expect {
|
332
|
+
klass.any_instance.unstub(:existing_method)
|
333
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError, 'The method `existing_method` was not stubbed or was already unstubbed')
|
334
|
+
end
|
335
|
+
end
|
336
|
+
|
337
|
+
context "with #should_not_receive" do
|
338
|
+
it "fails if the method is called" do
|
339
|
+
klass.any_instance.should_not_receive(:existing_method)
|
340
|
+
expect { klass.new.existing_method }.to raise_error(RSpec::Mocks::MockExpectationError)
|
341
|
+
end
|
342
|
+
|
343
|
+
it "passes if no method is called" do
|
344
|
+
expect { klass.any_instance.should_not_receive(:existing_method) }.to_not raise_error
|
345
|
+
end
|
346
|
+
|
347
|
+
it "passes if only a different method is called" do
|
348
|
+
klass.any_instance.should_not_receive(:existing_method)
|
349
|
+
expect { klass.new.another_existing_method }.to_not raise_error
|
350
|
+
end
|
351
|
+
|
352
|
+
context "with constraints" do
|
353
|
+
it "fails if the method is called with the specified parameters" do
|
354
|
+
klass.any_instance.should_not_receive(:existing_method_with_arguments).with(:argument_one, :argument_two)
|
355
|
+
expect {
|
356
|
+
klass.new.existing_method_with_arguments(:argument_one, :argument_two)
|
357
|
+
}.to raise_error(RSpec::Mocks::MockExpectationError)
|
358
|
+
end
|
359
|
+
|
360
|
+
it "passes if the method is called with different parameters" do
|
361
|
+
klass.any_instance.should_not_receive(:existing_method_with_arguments).with(:argument_one, :argument_two)
|
362
|
+
expect { klass.new.existing_method_with_arguments(:argument_three, :argument_four) }.to_not raise_error
|
363
|
+
end
|
364
|
+
end
|
365
|
+
|
366
|
+
context 'when used in combination with should_receive' do
|
367
|
+
it 'passes if only the expected message is received' do
|
368
|
+
klass.any_instance.should_receive(:foo)
|
369
|
+
klass.any_instance.should_not_receive(:bar)
|
370
|
+
klass.new.foo
|
371
|
+
RSpec::Mocks.space.verify_all
|
372
|
+
end
|
373
|
+
end
|
374
|
+
|
375
|
+
it "prevents confusing double-negative expressions involving `never`" do
|
376
|
+
expect {
|
377
|
+
klass.any_instance.should_not_receive(:not_expected).never
|
378
|
+
}.to raise_error(/trying to negate it again/)
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
context "with #should_receive" do
|
383
|
+
let(:foo_expectation_error_message) { 'Exactly one instance should have received the following message(s) but didn\'t: foo' }
|
384
|
+
let(:existing_method_expectation_error_message) { 'Exactly one instance should have received the following message(s) but didn\'t: existing_method' }
|
385
|
+
|
386
|
+
context "with an expectation is set on a method which does not exist" do
|
387
|
+
it "returns the expected value" do
|
388
|
+
klass.any_instance.should_receive(:foo).and_return(1)
|
389
|
+
expect(klass.new.foo(1)).to eq(1)
|
390
|
+
end
|
391
|
+
|
392
|
+
it "fails if an instance is created but no invocation occurs" do
|
393
|
+
expect do
|
394
|
+
klass.any_instance.should_receive(:foo)
|
395
|
+
klass.new
|
396
|
+
RSpec::Mocks.space.verify_all
|
397
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, foo_expectation_error_message)
|
398
|
+
end
|
399
|
+
|
400
|
+
it "fails if no instance is created" do
|
401
|
+
expect do
|
402
|
+
klass.any_instance.should_receive(:foo).and_return(1)
|
403
|
+
RSpec::Mocks.space.verify_all
|
404
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, foo_expectation_error_message)
|
405
|
+
end
|
406
|
+
|
407
|
+
it "fails if no instance is created and there are multiple expectations" do
|
408
|
+
expect do
|
409
|
+
klass.any_instance.should_receive(:foo)
|
410
|
+
klass.any_instance.should_receive(:bar)
|
411
|
+
RSpec::Mocks.space.verify_all
|
412
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, 'Exactly one instance should have received the following message(s) but didn\'t: bar, foo')
|
413
|
+
end
|
414
|
+
|
415
|
+
it "allows expectations on instances to take priority" do
|
416
|
+
klass.any_instance.should_receive(:foo)
|
417
|
+
klass.new.foo
|
418
|
+
|
419
|
+
instance = klass.new
|
420
|
+
instance.should_receive(:foo).and_return(result = Object.new)
|
421
|
+
expect(instance.foo).to eq(result)
|
422
|
+
end
|
423
|
+
|
424
|
+
context "behaves as 'exactly one instance'" do
|
425
|
+
it "passes if subsequent invocations do not receive that message" do
|
426
|
+
klass.any_instance.should_receive(:foo)
|
427
|
+
klass.new.foo
|
428
|
+
klass.new
|
429
|
+
end
|
430
|
+
|
431
|
+
it "fails if the method is invoked on a second instance" do
|
432
|
+
instance_one = klass.new
|
433
|
+
instance_two = klass.new
|
434
|
+
expect do
|
435
|
+
klass.any_instance.should_receive(:foo)
|
436
|
+
|
437
|
+
instance_one.foo
|
438
|
+
instance_two.foo
|
439
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, "The message 'foo' was received by #{instance_two.inspect} but has already been received by #{instance_one.inspect}")
|
440
|
+
end
|
441
|
+
end
|
442
|
+
|
443
|
+
context "normal expectations on the class object" do
|
444
|
+
it "fail when unfulfilled" do
|
445
|
+
expect do
|
446
|
+
klass.any_instance.should_receive(:foo)
|
447
|
+
klass.should_receive(:woot)
|
448
|
+
klass.new.foo
|
449
|
+
RSpec::Mocks.space.verify_all
|
450
|
+
end.to(raise_error(RSpec::Mocks::MockExpectationError) do |error|
|
451
|
+
expect(error.message).not_to eq(existing_method_expectation_error_message)
|
452
|
+
end)
|
453
|
+
end
|
454
|
+
|
455
|
+
|
456
|
+
it "pass when expectations are met" do
|
457
|
+
klass.any_instance.should_receive(:foo)
|
458
|
+
klass.should_receive(:woot).and_return(result = Object.new)
|
459
|
+
klass.new.foo
|
460
|
+
expect(klass.woot).to eq(result)
|
461
|
+
end
|
462
|
+
end
|
463
|
+
end
|
464
|
+
|
465
|
+
context "with an expectation is set on a method that exists" do
|
466
|
+
it "returns the expected value" do
|
467
|
+
klass.any_instance.should_receive(:existing_method).and_return(1)
|
468
|
+
expect(klass.new.existing_method(1)).to eq(1)
|
469
|
+
end
|
470
|
+
|
471
|
+
it "fails if an instance is created but no invocation occurs" do
|
472
|
+
expect do
|
473
|
+
klass.any_instance.should_receive(:existing_method)
|
474
|
+
klass.new
|
475
|
+
RSpec::Mocks.space.verify_all
|
476
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, existing_method_expectation_error_message)
|
477
|
+
end
|
478
|
+
|
479
|
+
it "fails if no instance is created" do
|
480
|
+
expect do
|
481
|
+
klass.any_instance.should_receive(:existing_method)
|
482
|
+
RSpec::Mocks.space.verify_all
|
483
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, existing_method_expectation_error_message)
|
484
|
+
end
|
485
|
+
|
486
|
+
it "fails if no instance is created and there are multiple expectations" do
|
487
|
+
expect do
|
488
|
+
klass.any_instance.should_receive(:existing_method)
|
489
|
+
klass.any_instance.should_receive(:another_existing_method)
|
490
|
+
RSpec::Mocks.space.verify_all
|
491
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, 'Exactly one instance should have received the following message(s) but didn\'t: another_existing_method, existing_method')
|
492
|
+
end
|
493
|
+
|
494
|
+
context "after any one instance has received a message" do
|
495
|
+
it "passes if subsequent invocations do not receive that message" do
|
496
|
+
klass.any_instance.should_receive(:existing_method)
|
497
|
+
klass.new.existing_method
|
498
|
+
klass.new
|
499
|
+
end
|
500
|
+
|
501
|
+
it "fails if the method is invoked on a second instance" do
|
502
|
+
instance_one = klass.new
|
503
|
+
instance_two = klass.new
|
504
|
+
expect do
|
505
|
+
klass.any_instance.should_receive(:existing_method)
|
506
|
+
|
507
|
+
instance_one.existing_method
|
508
|
+
instance_two.existing_method
|
509
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, "The message 'existing_method' was received by #{instance_two.inspect} but has already been received by #{instance_one.inspect}")
|
510
|
+
end
|
511
|
+
end
|
512
|
+
end
|
513
|
+
|
514
|
+
it 'works with a BasicObject subclass that mixes in Kernel', :if => defined?(BasicObject) do
|
515
|
+
klass = Class.new(BasicObject) do
|
516
|
+
include ::Kernel
|
517
|
+
def foo; end
|
518
|
+
end
|
519
|
+
|
520
|
+
klass.any_instance.should_receive(:foo)
|
521
|
+
klass.new.foo
|
522
|
+
end
|
523
|
+
|
524
|
+
it 'works with a SimpleDelegator subclass', :if => (RUBY_VERSION.to_f > 1.8) do
|
525
|
+
klass = Class.new(SimpleDelegator) do
|
526
|
+
def foo; end
|
527
|
+
end
|
528
|
+
|
529
|
+
klass.any_instance.should_receive(:foo)
|
530
|
+
klass.new(Object.new).foo
|
531
|
+
end
|
532
|
+
|
533
|
+
context "with argument matching" do
|
534
|
+
before do
|
535
|
+
klass.any_instance.should_receive(:foo).with(:param_one, :param_two).and_return(:result_one)
|
536
|
+
klass.any_instance.should_receive(:foo).with(:param_three, :param_four).and_return(:result_two)
|
537
|
+
end
|
538
|
+
|
539
|
+
it "returns the expected value when arguments match" do
|
540
|
+
instance = klass.new
|
541
|
+
expect(instance.foo(:param_one, :param_two)).to eq(:result_one)
|
542
|
+
expect(instance.foo(:param_three, :param_four)).to eq(:result_two)
|
543
|
+
end
|
544
|
+
|
545
|
+
it "fails when the arguments match but different instances are used" do
|
546
|
+
instances = Array.new(2) { klass.new }
|
547
|
+
expect do
|
548
|
+
expect(instances[0].foo(:param_one, :param_two)).to eq(:result_one)
|
549
|
+
expect(instances[1].foo(:param_three, :param_four)).to eq(:result_two)
|
550
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
551
|
+
|
552
|
+
# ignore the fact that should_receive expectations were not met
|
553
|
+
instances.each { |instance| reset instance }
|
554
|
+
end
|
555
|
+
|
556
|
+
it "is not affected by the invocation of existing methods on other instances" do
|
557
|
+
expect(klass.new.existing_method_with_arguments(:param_one, :param_two)).to eq(:existing_method_with_arguments_return_value)
|
558
|
+
instance = klass.new
|
559
|
+
expect(instance.foo(:param_one, :param_two)).to eq(:result_one)
|
560
|
+
expect(instance.foo(:param_three, :param_four)).to eq(:result_two)
|
561
|
+
end
|
562
|
+
|
563
|
+
it "fails when arguments do not match" do
|
564
|
+
instance = klass.new
|
565
|
+
expect do
|
566
|
+
instance.foo(:param_one, :param_three)
|
567
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
568
|
+
|
569
|
+
# ignore the fact that should_receive expectations were not met
|
570
|
+
reset instance
|
571
|
+
end
|
572
|
+
end
|
573
|
+
|
574
|
+
context "message count" do
|
575
|
+
context "the 'once' constraint" do
|
576
|
+
it "passes for one invocation" do
|
577
|
+
klass.any_instance.should_receive(:foo).once
|
578
|
+
klass.new.foo
|
579
|
+
end
|
580
|
+
|
581
|
+
it "fails when no instances are declared" do
|
582
|
+
expect do
|
583
|
+
klass.any_instance.should_receive(:foo).once
|
584
|
+
RSpec::Mocks.space.verify_all
|
585
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, foo_expectation_error_message)
|
586
|
+
end
|
587
|
+
|
588
|
+
it "fails when an instance is declared but there are no invocations" do
|
589
|
+
expect do
|
590
|
+
klass.any_instance.should_receive(:foo).once
|
591
|
+
klass.new
|
592
|
+
RSpec::Mocks.space.verify_all
|
593
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, foo_expectation_error_message)
|
594
|
+
end
|
595
|
+
|
596
|
+
it "fails for more than one invocation" do
|
597
|
+
expect do
|
598
|
+
klass.any_instance.should_receive(:foo).once
|
599
|
+
instance = klass.new
|
600
|
+
2.times { instance.foo }
|
601
|
+
verify instance
|
602
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
603
|
+
end
|
604
|
+
end
|
605
|
+
|
606
|
+
context "the 'twice' constraint" do
|
607
|
+
it "passes for two invocations" do
|
608
|
+
klass.any_instance.should_receive(:foo).twice
|
609
|
+
instance = klass.new
|
610
|
+
2.times { instance.foo }
|
611
|
+
end
|
612
|
+
|
613
|
+
it "fails for more than two invocations" do
|
614
|
+
expect do
|
615
|
+
klass.any_instance.should_receive(:foo).twice
|
616
|
+
instance = klass.new
|
617
|
+
3.times { instance.foo }
|
618
|
+
verify instance
|
619
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
620
|
+
end
|
621
|
+
end
|
622
|
+
|
623
|
+
context "the 'exactly(n)' constraint" do
|
624
|
+
it "passes for n invocations where n = 3" do
|
625
|
+
klass.any_instance.should_receive(:foo).exactly(3).times
|
626
|
+
instance = klass.new
|
627
|
+
3.times { instance.foo }
|
628
|
+
end
|
629
|
+
|
630
|
+
it "fails for n invocations where n < 3" do
|
631
|
+
expect do
|
632
|
+
klass.any_instance.should_receive(:foo).exactly(3).times
|
633
|
+
instance = klass.new
|
634
|
+
2.times { instance.foo }
|
635
|
+
verify instance
|
636
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
637
|
+
end
|
638
|
+
|
639
|
+
it "fails for n invocations where n > 3" do
|
640
|
+
expect do
|
641
|
+
klass.any_instance.should_receive(:foo).exactly(3).times
|
642
|
+
instance = klass.new
|
643
|
+
4.times { instance.foo }
|
644
|
+
verify instance
|
645
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
646
|
+
end
|
647
|
+
end
|
648
|
+
|
649
|
+
context "the 'at_least(n)' constraint" do
|
650
|
+
it "passes for n invocations where n = 3" do
|
651
|
+
klass.any_instance.should_receive(:foo).at_least(3).times
|
652
|
+
instance = klass.new
|
653
|
+
3.times { instance.foo }
|
654
|
+
end
|
655
|
+
|
656
|
+
it "fails for n invocations where n < 3" do
|
657
|
+
expect do
|
658
|
+
klass.any_instance.should_receive(:foo).at_least(3).times
|
659
|
+
instance = klass.new
|
660
|
+
2.times { instance.foo }
|
661
|
+
verify instance
|
662
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
663
|
+
end
|
664
|
+
|
665
|
+
it "passes for n invocations where n > 3" do
|
666
|
+
klass.any_instance.should_receive(:foo).at_least(3).times
|
667
|
+
instance = klass.new
|
668
|
+
4.times { instance.foo }
|
669
|
+
end
|
670
|
+
end
|
671
|
+
|
672
|
+
context "the 'at_most(n)' constraint" do
|
673
|
+
it "passes for n invocations where n = 3" do
|
674
|
+
klass.any_instance.should_receive(:foo).at_most(3).times
|
675
|
+
instance = klass.new
|
676
|
+
3.times { instance.foo }
|
677
|
+
end
|
678
|
+
|
679
|
+
it "passes for n invocations where n < 3" do
|
680
|
+
klass.any_instance.should_receive(:foo).at_most(3).times
|
681
|
+
instance = klass.new
|
682
|
+
2.times { instance.foo }
|
683
|
+
end
|
684
|
+
|
685
|
+
it "fails for n invocations where n > 3" do
|
686
|
+
expect do
|
687
|
+
klass.any_instance.should_receive(:foo).at_most(3).times
|
688
|
+
instance = klass.new
|
689
|
+
4.times { instance.foo }
|
690
|
+
verify instance
|
691
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
692
|
+
end
|
693
|
+
end
|
694
|
+
|
695
|
+
context "the 'never' constraint" do
|
696
|
+
it "passes for 0 invocations" do
|
697
|
+
klass.any_instance.should_receive(:foo).never
|
698
|
+
RSpec::Mocks.space.verify_all
|
699
|
+
end
|
700
|
+
|
701
|
+
it "fails on the first invocation" do
|
702
|
+
expect do
|
703
|
+
klass.any_instance.should_receive(:foo).never
|
704
|
+
klass.new.foo
|
705
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError)
|
706
|
+
end
|
707
|
+
|
708
|
+
context "when combined with other expectations" do
|
709
|
+
it "passes when the other expecations are met" do
|
710
|
+
klass.any_instance.should_receive(:foo).never
|
711
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
712
|
+
expect(klass.new.existing_method).to eq(5)
|
713
|
+
end
|
714
|
+
|
715
|
+
it "fails when the other expecations are not met" do
|
716
|
+
expect do
|
717
|
+
klass.any_instance.should_receive(:foo).never
|
718
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
719
|
+
RSpec::Mocks.space.verify_all
|
720
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, existing_method_expectation_error_message)
|
721
|
+
end
|
722
|
+
end
|
723
|
+
end
|
724
|
+
|
725
|
+
context "the 'any_number_of_times' constraint" do
|
726
|
+
it "passes for 0 invocations" do
|
727
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
728
|
+
verify klass.new
|
729
|
+
end
|
730
|
+
|
731
|
+
it "passes for a non-zero number of invocations" do
|
732
|
+
allow(RSpec).to receive(:deprecate).with("any_number_of_times", :replacement => "stub")
|
733
|
+
|
734
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
735
|
+
instance = klass.new
|
736
|
+
instance.foo
|
737
|
+
verify instance
|
738
|
+
end
|
739
|
+
|
740
|
+
it "does not interfere with other expectations" do
|
741
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
742
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
743
|
+
expect(klass.new.existing_method).to eq(5)
|
744
|
+
end
|
745
|
+
|
746
|
+
context "when combined with other expectations" do
|
747
|
+
it "passes when the other expecations are met" do
|
748
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
749
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
750
|
+
expect(klass.new.existing_method).to eq(5)
|
751
|
+
end
|
752
|
+
|
753
|
+
it "fails when the other expecations are not met" do
|
754
|
+
expect do
|
755
|
+
klass.any_instance.should_receive(:foo).any_number_of_times
|
756
|
+
klass.any_instance.should_receive(:existing_method).and_return(5)
|
757
|
+
RSpec::Mocks.space.verify_all
|
758
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, existing_method_expectation_error_message)
|
759
|
+
end
|
760
|
+
end
|
761
|
+
end
|
762
|
+
end
|
763
|
+
end
|
764
|
+
|
765
|
+
context "when resetting post-verification" do
|
766
|
+
let(:space) { RSpec::Mocks.space }
|
767
|
+
|
768
|
+
context "existing method" do
|
769
|
+
before(:each) do
|
770
|
+
klass.any_instance # to force it to be tracked
|
771
|
+
end
|
772
|
+
|
773
|
+
context "with stubbing" do
|
774
|
+
context "public methods" do
|
775
|
+
before(:each) do
|
776
|
+
klass.any_instance.stub(:existing_method).and_return(1)
|
777
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_true
|
778
|
+
end
|
779
|
+
|
780
|
+
it "restores the class to its original state after each example when no instance is created" do
|
781
|
+
space.verify_all
|
782
|
+
|
783
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
784
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
785
|
+
end
|
786
|
+
|
787
|
+
it "restores the class to its original state after each example when one instance is created" do
|
788
|
+
klass.new.existing_method
|
789
|
+
|
790
|
+
space.verify_all
|
791
|
+
|
792
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
793
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
794
|
+
end
|
795
|
+
|
796
|
+
it "restores the class to its original state after each example when more than one instance is created" do
|
797
|
+
klass.new.existing_method
|
798
|
+
klass.new.existing_method
|
799
|
+
|
800
|
+
space.verify_all
|
801
|
+
|
802
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
803
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
804
|
+
end
|
805
|
+
end
|
806
|
+
|
807
|
+
context "private methods" do
|
808
|
+
before :each do
|
809
|
+
klass.any_instance.stub(:private_method).and_return(:something)
|
810
|
+
space.verify_all
|
811
|
+
end
|
812
|
+
|
813
|
+
it "cleans up the backed up method" do
|
814
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
815
|
+
end
|
816
|
+
|
817
|
+
it "restores a stubbed private method after the spec is run" do
|
818
|
+
expect(klass.private_method_defined?(:private_method)).to be_true
|
819
|
+
end
|
820
|
+
|
821
|
+
it "ensures that the restored method behaves as it originally did" do
|
822
|
+
expect(klass.new.send(:private_method)).to eq(:private_method_return_value)
|
823
|
+
end
|
824
|
+
end
|
825
|
+
end
|
826
|
+
|
827
|
+
context "with expectations" do
|
828
|
+
context "private methods" do
|
829
|
+
before :each do
|
830
|
+
klass.any_instance.should_receive(:private_method).and_return(:something)
|
831
|
+
klass.new.private_method
|
832
|
+
space.verify_all
|
833
|
+
end
|
834
|
+
|
835
|
+
it "cleans up the backed up method" do
|
836
|
+
expect(klass.method_defined?(:__existing_method_without_any_instance__)).to be_false
|
837
|
+
end
|
838
|
+
|
839
|
+
it "restores a stubbed private method after the spec is run" do
|
840
|
+
expect(klass.private_method_defined?(:private_method)).to be_true
|
841
|
+
end
|
842
|
+
|
843
|
+
it "ensures that the restored method behaves as it originally did" do
|
844
|
+
expect(klass.new.send(:private_method)).to eq(:private_method_return_value)
|
845
|
+
end
|
846
|
+
end
|
847
|
+
|
848
|
+
context "ensures that the subsequent specs do not see expectations set in previous specs" do
|
849
|
+
context "when the instance created after the expectation is set" do
|
850
|
+
it "first spec" do
|
851
|
+
klass.any_instance.should_receive(:existing_method).and_return(Object.new)
|
852
|
+
klass.new.existing_method
|
853
|
+
end
|
854
|
+
|
855
|
+
it "second spec" do
|
856
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
857
|
+
end
|
858
|
+
end
|
859
|
+
|
860
|
+
context "when the instance created before the expectation is set" do
|
861
|
+
before :each do
|
862
|
+
@instance = klass.new
|
863
|
+
end
|
864
|
+
|
865
|
+
it "first spec" do
|
866
|
+
klass.any_instance.should_receive(:existing_method).and_return(Object.new)
|
867
|
+
@instance.existing_method
|
868
|
+
end
|
869
|
+
|
870
|
+
it "second spec" do
|
871
|
+
expect(@instance.existing_method).to eq(existing_method_return_value)
|
872
|
+
end
|
873
|
+
end
|
874
|
+
end
|
875
|
+
|
876
|
+
it "ensures that the next spec does not see that expectation" do
|
877
|
+
klass.any_instance.should_receive(:existing_method).and_return(Object.new)
|
878
|
+
klass.new.existing_method
|
879
|
+
space.verify_all
|
880
|
+
|
881
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
882
|
+
end
|
883
|
+
end
|
884
|
+
end
|
885
|
+
|
886
|
+
context "with multiple calls to any_instance in the same example" do
|
887
|
+
it "does not prevent the change from being rolled back" do
|
888
|
+
klass.any_instance.stub(:existing_method).and_return(false)
|
889
|
+
klass.any_instance.stub(:existing_method).and_return(true)
|
890
|
+
|
891
|
+
RSpec::Mocks.space.verify_all
|
892
|
+
expect(klass.new).to respond_to(:existing_method)
|
893
|
+
expect(klass.new.existing_method).to eq(existing_method_return_value)
|
894
|
+
end
|
895
|
+
end
|
896
|
+
|
897
|
+
it "adds an class to the current space when #any_instance is invoked" do
|
898
|
+
expect {
|
899
|
+
klass.any_instance
|
900
|
+
}.to change { space.any_instance_recorders.size }.by(1)
|
901
|
+
end
|
902
|
+
|
903
|
+
it "adds an instance to the current space when stubbed method is invoked" do
|
904
|
+
klass.any_instance.stub(:foo)
|
905
|
+
instance = klass.new
|
906
|
+
instance.foo
|
907
|
+
expect(RSpec::Mocks.space.proxies.keys).to include(instance.object_id)
|
908
|
+
end
|
909
|
+
end
|
910
|
+
|
911
|
+
context 'when used in conjunction with a `dup`' do
|
912
|
+
it "doesn't cause an infinite loop" do
|
913
|
+
pending "This intermittently fails on JRuby" if RUBY_PLATFORM == 'java'
|
914
|
+
|
915
|
+
Object.any_instance.stub(:some_method)
|
916
|
+
o = Object.new
|
917
|
+
o.some_method
|
918
|
+
expect { o.dup.some_method }.to_not raise_error
|
919
|
+
end
|
920
|
+
|
921
|
+
it "doesn't bomb if the object doesn't support `dup`" do
|
922
|
+
klass = Class.new do
|
923
|
+
undef_method :dup
|
924
|
+
end
|
925
|
+
klass.any_instance
|
926
|
+
end
|
927
|
+
|
928
|
+
it "doesn't fail when dup accepts parameters" do
|
929
|
+
klass = Class.new do
|
930
|
+
def dup(funky_option)
|
931
|
+
end
|
932
|
+
end
|
933
|
+
|
934
|
+
klass.any_instance
|
935
|
+
|
936
|
+
expect { klass.new.dup('Dup dup dup') }.to_not raise_error
|
937
|
+
end
|
938
|
+
end
|
939
|
+
|
940
|
+
context "when directed at a method defined on a superclass" do
|
941
|
+
let(:sub_klass) { Class.new(klass) }
|
942
|
+
|
943
|
+
it "stubs the method correctly" do
|
944
|
+
klass.any_instance.stub(:existing_method).and_return("foo")
|
945
|
+
expect(sub_klass.new.existing_method).to eq "foo"
|
946
|
+
end
|
947
|
+
|
948
|
+
it "mocks the method correctly" do
|
949
|
+
instance_one = sub_klass.new
|
950
|
+
instance_two = sub_klass.new
|
951
|
+
expect do
|
952
|
+
klass.any_instance.should_receive(:existing_method)
|
953
|
+
instance_one.existing_method
|
954
|
+
instance_two.existing_method
|
955
|
+
end.to raise_error(RSpec::Mocks::MockExpectationError, "The message 'existing_method' was received by #{instance_two.inspect} but has already been received by #{instance_one.inspect}")
|
956
|
+
end
|
957
|
+
end
|
958
|
+
|
959
|
+
context "when a class overrides Object#method" do
|
960
|
+
let(:http_request_class) { Struct.new(:method, :uri) }
|
961
|
+
|
962
|
+
it "stubs the method correctly" do
|
963
|
+
http_request_class.any_instance.stub(:existing_method).and_return("foo")
|
964
|
+
expect(http_request_class.new.existing_method).to eq "foo"
|
965
|
+
end
|
966
|
+
|
967
|
+
it "mocks the method correctly" do
|
968
|
+
http_request_class.any_instance.should_receive(:existing_method).and_return("foo")
|
969
|
+
expect(http_request_class.new.existing_method).to eq "foo"
|
970
|
+
end
|
971
|
+
end
|
972
|
+
|
973
|
+
context "when used after the test has finished" do
|
974
|
+
it "restores the original behavior of a stubbed method" do
|
975
|
+
klass.any_instance.stub(:existing_method).and_return(:stubbed_return_value)
|
976
|
+
|
977
|
+
instance = klass.new
|
978
|
+
expect(instance.existing_method).to eq :stubbed_return_value
|
979
|
+
|
980
|
+
RSpec::Mocks.verify
|
981
|
+
|
982
|
+
expect(instance.existing_method).to eq :existing_method_return_value
|
983
|
+
end
|
984
|
+
end
|
985
|
+
end
|
986
|
+
end
|
987
|
+
end
|