diff -Nru ruby-rr-1.2.0/debian/changelog ruby-rr-1.2.1/debian/changelog --- ruby-rr-1.2.0/debian/changelog 2016-10-11 08:35:35.000000000 +0000 +++ ruby-rr-1.2.1/debian/changelog 2018-01-27 15:17:36.000000000 +0000 @@ -1,3 +1,16 @@ +ruby-rr (1.2.1-2) unstable; urgency=medium + + * Change Vcs-* to salsa.debian.org + + -- TANIGUCHI Takaki Sun, 28 Jan 2018 00:17:36 +0900 + +ruby-rr (1.2.1-1) unstable; urgency=medium + + * New upstream version 1.2.1 + * Bump Standards-Version to 4.1.3 + + -- TANIGUCHI Takaki Sat, 27 Jan 2018 23:12:37 +0900 + ruby-rr (1.2.0-1) unstable; urgency=medium [ Cédric Boutillier ] diff -Nru ruby-rr-1.2.0/debian/control ruby-rr-1.2.1/debian/control --- ruby-rr-1.2.0/debian/control 2016-10-11 08:35:35.000000000 +0000 +++ ruby-rr-1.2.1/debian/control 2018-01-27 15:17:36.000000000 +0000 @@ -6,9 +6,9 @@ Praveen Arimbrathodiyil Build-Depends: debhelper (>= 9~), gem2deb -Standards-Version: 3.9.8 -Vcs-Git: https://anonscm.debian.org/git/pkg-ruby-extras/ruby-rr.git -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-ruby-extras/ruby-rr.git +Standards-Version: 4.1.3 +Vcs-Git: https://salsa.debian.org/ruby-team/ruby-rr.git +Vcs-Browser: https://salsa.debian.org/ruby-team/ruby-rr Homepage: http://rr.github.com/rr Testsuite: autopkgtest-pkg-ruby XS-Ruby-Versions: all diff -Nru ruby-rr-1.2.0/lib/rr/injections/double_injection.rb ruby-rr-1.2.1/lib/rr/injections/double_injection.rb --- ruby-rr-1.2.0/lib/rr/injections/double_injection.rb 2016-06-15 12:52:45.000000000 +0000 +++ ruby-rr-1.2.1/lib/rr/injections/double_injection.rb 2017-08-20 21:09:56.000000000 +0000 @@ -206,7 +206,8 @@ protected def deferred_bind_method - unless subject_has_method_defined?(original_method_alias_name) + if respond_to?(method_name) and + not subject_has_method_defined?(original_method_alias_name) bind_method_with_alias end @performed_deferred_bind = true diff -Nru ruby-rr-1.2.0/lib/rr/version.rb ruby-rr-1.2.1/lib/rr/version.rb --- ruby-rr-1.2.0/lib/rr/version.rb 2016-06-15 12:52:45.000000000 +0000 +++ ruby-rr-1.2.1/lib/rr/version.rb 2017-08-20 21:09:56.000000000 +0000 @@ -1,4 +1,4 @@ module RR - VERSION = '1.2.0'.freeze + VERSION = '1.2.1'.freeze def self.version; VERSION; end end diff -Nru ruby-rr-1.2.0/spec/suites/rspec_2/integration/rspec_2_spec.rb ruby-rr-1.2.1/spec/suites/rspec_2/integration/rspec_2_spec.rb --- ruby-rr-1.2.0/spec/suites/rspec_2/integration/rspec_2_spec.rb 2016-06-15 12:52:45.000000000 +0000 +++ ruby-rr-1.2.1/spec/suites/rspec_2/integration/rspec_2_spec.rb 1970-01-01 00:00:00.000000000 +0000 @@ -1,133 +0,0 @@ -require File.expand_path('../../spec_helper', __FILE__) - -describe 'Integration with RSpec 2' do - include IntegrationTests::RubyRSpec - - def configure_project_generator(project_generator) - super - project_generator.configure do |project| - project.rspec_version = 2 - end - end - - def self.including_the_adapter_manually_works - specify "including the adapter manually works" do - project = generate_project do |project| - project.add_to_prelude <<-EOT - RSpec.configure do |c| - c.mock_with :rr - end - EOT - end - project.add_test_file do |file| - file.add_working_test_case_with_adapter_tests do |test_case| - test_case.add_to_body <<-EOT - it 'loads the correct adapters' do - assert_adapters_loaded #{adapters_that_should_be_loaded.inspect} - end - EOT - end - end - result = project.run_tests - result.should be_success - result.should_not have_errors_or_failures - end - end - - def self.rr_hooks_into_the_test_framework_automatically - specify "RR hooks into the test framework automatically" do - project = generate_project - project.add_test_file do |file| - file.add_working_test_case - end - result = project.run_tests - result.should be_success - result.should_not have_errors_or_failures - end - end - - context 'when Bundler is autorequiring RR' do - def configure_project_generator(project_generator) - super - project_generator.configure do |project| - project.autorequire_gems = true - end - end - - def adapters_that_should_be_loaded - [:RSpec2] - end - - including_the_adapter_manually_works - end - - context 'when RR is being required manually' do - def configure_project_generator(project_generator) - super - project_generator.configure do |project| - project.autorequire_gems = false - end - end - - def adapters_that_should_be_loaded - [:RSpec2] - end - - rr_hooks_into_the_test_framework_automatically - including_the_adapter_manually_works - - specify "when RR raises an error it raises a failure not an exception" do - project = generate_project - project.add_test_file do |file| - file.add_test_case do |test_case| - test_case.add_test <<-EOT - object = Object.new - mock(object).foo - EOT - end - end - result = project.run_tests - result.should fail_with_output(/1 failure/) - end - - specify "it is still possible to use a custom RSpec-2 adapter" do - project = generate_project do |project| - project.add_to_prelude <<-EOT - module RR - module Adapters - module RSpec2 - include RRMethods - - def setup_mocks_for_rspec - RR.reset - end - - def verify_mocks_for_rspec - RR.verify - end - - def teardown_mocks_for_rspec - RR.reset - end - - def have_received(method = nil) - RR::Adapters::Rspec::InvocationMatcher.new(method) - end - end - end - end - - RSpec.configure do |c| - c.mock_with RR::Adapters::RSpec2 - end - EOT - end - project.add_test_file do |file| - file.add_test_case_with_adapter_tests - end - result = project.run_tests - result.should be_success - result.should_not have_errors_or_failures - end - end -end diff -Nru ruby-rr-1.2.0/spec/suites/rspec_2/unit/injections/double_injection/double_injection_spec.rb ruby-rr-1.2.1/spec/suites/rspec_2/unit/injections/double_injection/double_injection_spec.rb --- ruby-rr-1.2.0/spec/suites/rspec_2/unit/injections/double_injection/double_injection_spec.rb 2016-06-15 12:52:45.000000000 +0000 +++ ruby-rr-1.2.1/spec/suites/rspec_2/unit/injections/double_injection/double_injection_spec.rb 2017-08-20 21:09:56.000000000 +0000 @@ -231,12 +231,6 @@ end describe "being called" do - it "defines __rr__original_{method_name} to be the lazily created method" do - subject.foobar - expect((!!subject.methods.detect {|method| method.to_sym == :__rr__original_foobar})).to be_true - expect(subject.__rr__original_foobar).to eq :original_foobar - end - it "calls the lazily created method and returns the injected method return value" do original_return_value = nil stub.proxy(subject).foobar {|arg| original_return_value = arg; :new_foobar} @@ -383,12 +377,6 @@ end describe "being called" do - it "defines __rr__original_{method_name} to be the lazily created method" do - subject.foobar - expect((!!subject.methods.detect {|method| method.to_sym == :__rr__original_foobar})).to be_true - expect(subject.__rr__original_foobar).to eq :original_foobar - end - it "calls the lazily created method and returns the injected method return value" do original_return_value = nil stub.proxy(subject).foobar {|arg| original_return_value = arg; :new_foobar} diff -Nru ruby-rr-1.2.0/spec/suites/rspec_2_rails_4/integration/rspec_2_rails_4_spec.rb ruby-rr-1.2.1/spec/suites/rspec_2_rails_4/integration/rspec_2_rails_4_spec.rb --- ruby-rr-1.2.0/spec/suites/rspec_2_rails_4/integration/rspec_2_rails_4_spec.rb 2016-06-15 12:52:45.000000000 +0000 +++ ruby-rr-1.2.1/spec/suites/rspec_2_rails_4/integration/rspec_2_rails_4_spec.rb 1970-01-01 00:00:00.000000000 +0000 @@ -1,173 +0,0 @@ -require File.expand_path('../../spec_helper', __FILE__) - -describe 'Integration with RSpec 2 and Rails 4' do - include IntegrationTests::RailsRSpec - - def configure_rails_project_generator(project_generator) - super - project_generator.configure do |project| - project.rails_version = 4 - end - end - - def configure_project_generator(project_generator) - super - project_generator.configure do |project| - project.rspec_version = 2 - end - end - - def self.including_the_adapter_manually_works - specify "including the adapter manually works" do - project = generate_project do |project| - project.add_to_prelude <<-EOT - RSpec.configure do |c| - c.mock_with :rr - end - EOT - end - project.add_test_file do |file| - file.add_working_test_case_with_adapter_tests do |test_case| - test_case.add_to_body <<-EOT - it 'loads the correct adapters' do - assert_adapters_loaded #{adapters_that_should_be_loaded.inspect} - end - EOT - end - end - result = project.run_tests - result.should be_success - result.should_not have_errors_or_failures - end - end - - def self.rr_hooks_into_the_test_framework_automatically - specify "RR hooks into the test framework automatically" do - project = generate_project - project.add_test_file do |file| - file.add_working_test_case - end - result = project.run_tests - result.should be_success - result.should_not have_errors_or_failures - end - end - - def self.using_rr_with_cucumber_works - specify "using RR with Cucumber works" do - pending "Cucumber doesn't work with Rails 4 just yet" - project_generator = build_rails_project_generator do |project_generator| - project_generator.mixin Project::Cucumber - end - project = project_generator.call - result = project.run_command_within("bundle exec cucumber") - result.should be_success - end - end - - context 'when Bundler is autorequiring RR' do - def configure_project_generator(project_generator) - super - project_generator.configure do |project| - project.autorequire_gems = true - end - end - - def adapters_that_should_be_loaded - [:RSpec2] - end - - including_the_adapter_manually_works - using_rr_with_cucumber_works - end - - context 'when RR is being required manually' do - def configure_project_generator(project_generator) - super - project_generator.configure do |project| - project.autorequire_gems = false - end - end - - def adapters_that_should_be_loaded - [:RSpec2] - end - - rr_hooks_into_the_test_framework_automatically - including_the_adapter_manually_works - using_rr_with_cucumber_works - - specify "when RR raises an error it raises a failure not an exception" do - project = generate_project - project.add_test_file do |file| - file.add_test_case do |test_case| - test_case.add_test <<-EOT - object = Object.new - mock(object).foo - EOT - end - end - result = project.run_tests - result.should fail_with_output(/1 failure/) - end - - specify "the database is properly rolled back after an RR error" do - project = generate_project do |project| - project.add_model_and_migration(:person, :people, :name => :string) - end - project.add_test_file do |file| - file.add_test_case do |test_case| - test_case.add_test <<-EOT - Person.create!(:name => 'Joe Blow') - object = Object.new - mock(object).foo - EOT - end - end - expect { - result = project.run_tests - result.should have_errors_or_failures - }.to leave_database_table_clear(project, :people) - end - - specify "it is still possible to use a custom RSpec-2 adapter" do - project = generate_project do |project| - project.add_to_prelude <<-EOT - module RR - module Adapters - module RSpec2 - include RRMethods - - def setup_mocks_for_rspec - RR.reset - end - - def verify_mocks_for_rspec - RR.verify - end - - def teardown_mocks_for_rspec - RR.reset - end - - def have_received(method = nil) - RR::Adapters::Rspec::InvocationMatcher.new(method) - end - end - end - end - - RSpec.configure do |c| - c.mock_with RR::Adapters::RSpec2 - end - EOT - end - project.add_test_file do |file| - file.add_test_case_with_adapter_tests - end - result = project.run_tests - result.should be_success - result.should_not have_errors_or_failures - end - end -end