summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-08-12 05:55:59 +0900
committerHomu <homu@barosl.com>2016-08-12 05:55:59 +0900
commit1873fa56790c582bbc744e558224b94d64184267 (patch)
treedb224c71a0e2eb3de8960a2265c020fc74480f3e
parent4a4b837a2a37d0ac5dd04bb61a2fee19424a03ac (diff)
parent81ac44b393076af91d4fb5cc3fab04f2b55c0b1f (diff)
downloadbundler-1873fa56790c582bbc744e558224b94d64184267.tar.gz
Auto merge of #4872 - bundler:seg-fix-realworld, r=segiddins
Update realworld specs for rails 3.2.22.4
-rw-r--r--spec/realworld/dependency_api_spec.rb3
-rw-r--r--spec/realworld/edgecases_spec.rb2
-rw-r--r--spec/realworld/gemfile_source_header_spec.rb3
-rw-r--r--spec/realworld/mirror_probe_spec.rb3
-rw-r--r--spec/resolver/basic_spec.rb1
-rw-r--r--spec/runtime/setup_spec.rb2
-rw-r--r--spec/spec_helper.rb2
-rw-r--r--spec/support/silent_logger.rb9
-rw-r--r--spec/support/sometimes.rb3
9 files changed, 20 insertions, 8 deletions
diff --git a/spec/realworld/dependency_api_spec.rb b/spec/realworld/dependency_api_spec.rb
index bbb6f4a150..9823cf8c76 100644
--- a/spec/realworld/dependency_api_spec.rb
+++ b/spec/realworld/dependency_api_spec.rb
@@ -16,7 +16,8 @@ describe "gemcutter's dependency API", :realworld => true do
:Host => "0.0.0.0",
:Port => port,
:server => "webrick",
- :AccessLog => [])
+ :AccessLog => [],
+ :Logger => Spec::SilentLogger.new)
server.start
end
@t.run
diff --git a/spec/realworld/edgecases_spec.rb b/spec/realworld/edgecases_spec.rb
index f3f6515a9f..7a78a114b4 100644
--- a/spec/realworld/edgecases_spec.rb
+++ b/spec/realworld/edgecases_spec.rb
@@ -49,7 +49,7 @@ describe "real world edgecases", :realworld => true, :sometimes => true do
gem 'rack-cache', '1.2.0' # last version that works on Ruby 1.9
G
bundle :lock
- expect(lockfile).to include("rails (3.2.22.2)")
+ expect(lockfile).to include("rails (3.2.22.4)")
expect(lockfile).to include("capybara (2.2.1)")
end
diff --git a/spec/realworld/gemfile_source_header_spec.rb b/spec/realworld/gemfile_source_header_spec.rb
index 38d419a246..1c39fe97bb 100644
--- a/spec/realworld/gemfile_source_header_spec.rb
+++ b/spec/realworld/gemfile_source_header_spec.rb
@@ -43,7 +43,8 @@ describe "fetching dependencies with a mirrored source", :realworld => true, :ru
:Host => "0.0.0.0",
:Port => @port,
:server => "webrick",
- :AccessLog => [])
+ :AccessLog => [],
+ :Logger => Spec::SilentLogger.new)
end.run
wait_for_server("127.0.0.1", @port)
diff --git a/spec/realworld/mirror_probe_spec.rb b/spec/realworld/mirror_probe_spec.rb
index c46e4e7f20..bb2be7f232 100644
--- a/spec/realworld/mirror_probe_spec.rb
+++ b/spec/realworld/mirror_probe_spec.rb
@@ -112,7 +112,8 @@ describe "fetching dependencies with a not available mirror", :realworld => true
:Host => host,
:Port => @server_port,
:server => "webrick",
- :AccessLog => [])
+ :AccessLog => [],
+ :Logger => Spec::SilentLogger.new)
end.run
wait_for_server(host, @server_port)
diff --git a/spec/resolver/basic_spec.rb b/spec/resolver/basic_spec.rb
index 48224ae7af..b7b8b4c3b8 100644
--- a/spec/resolver/basic_spec.rb
+++ b/spec/resolver/basic_spec.rb
@@ -213,7 +213,6 @@ describe "Resolving" do
it "will not revert to a previous version in strict mode level patch" do
pending "possible issue with molinillo - needs further research"
- ENV["DEBUG_RESOLVER"] = "true"
should_conservative_resolve_and_include [:patch, :strict], [], %w(foo-1.4.3 bar-2.1.1)
end
diff --git a/spec/runtime/setup_spec.rb b/spec/runtime/setup_spec.rb
index 56ffd6ccab..eab66e2ee2 100644
--- a/spec/runtime/setup_spec.rb
+++ b/spec/runtime/setup_spec.rb
@@ -926,7 +926,7 @@ describe "Bundler.setup" do
s.write "bar.gemspec", "require 'foobarbaz'"
end.ref_for("HEAD")
bundle :install
- puts out
+
expect(out.lines.map(&:chomp)).to include(
a_string_starting_with("[!] There was an error while loading `bar.gemspec`:"),
RUBY_VERSION >= "1.9" ? a_string_starting_with("Does it try to require a relative path? That's been removed in Ruby 1.9.") : "",
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 074645ec50..a3251ea640 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -103,7 +103,7 @@ RSpec.configure do |config|
config.after :each do |example|
@all_output.strip!
if example.exception && !@all_output.empty?
- warn @all_output
+ warn @all_output unless config.formatters.grep(RSpec::Core::Formatters::DocumentationFormatter).empty?
message = example.exception.message + "\n\nCommands:\n#{@all_output}"
(class << example.exception; self; end).send(:define_method, :message) do
message
diff --git a/spec/support/silent_logger.rb b/spec/support/silent_logger.rb
new file mode 100644
index 0000000000..1a8f91b3ba
--- /dev/null
+++ b/spec/support/silent_logger.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+require "logger"
+module Spec
+ class SilentLogger
+ (::Logger.instance_methods - Object.instance_methods).each do |logger_instance_method|
+ define_method(logger_instance_method) {|*args, &blk| }
+ end
+ end
+end
diff --git a/spec/support/sometimes.rb b/spec/support/sometimes.rb
index 1ecbd36e2d..6a50f5ff4c 100644
--- a/spec/support/sometimes.rb
+++ b/spec/support/sometimes.rb
@@ -33,7 +33,8 @@ RSpec.configure do |config|
message = proc do |color, text|
colored = RSpec::Core::Formatters::ConsoleCodes.wrap(text, color)
notification = RSpec::Core::Notifications::MessageNotification.new(colored)
- RSpec.configuration.formatters.first.message(notification)
+ formatter = RSpec.configuration.formatters.first
+ formatter.message(notification) if formatter.respond_to?(:message)
end
retried_examples = RSpec.world.example_groups.map do |g|