Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Use a no-op logger in the spec suite. Addresses #175 #180

Merged
merged 1 commit into from

3 participants

Sean Cribbs Asmod4n Lars
Sean Cribbs
Owner

No description provided.

Deleted user

hard to test on my side, but I assume this would let the tests run on windows.

Sean Cribbs
Owner

Why is that hard to test? 'logger' is in the standard library.

Deleted user

No access to windows PC but I assume it'd work

Asmod4n
Collaborator

You can run cygwin with wine i would guess.

Deleted user

I will test today and get back to you.

Deleted user

make that tomorrow

Sean Cribbs
Owner

@rpag Did you have a chance to try this?

Deleted user
Deleted user

yup, confirm, test suite runs on Windows7 with this branch.

Sean Cribbs
Owner

Thanks @rpag.

Sean Cribbs seancribbs merged commit 06492f9 into from
Sean Cribbs seancribbs deleted the branch
Deleted user
Deleted user

the failures seem to pop up in lib/webmachine/spec/adapter_lint.rb with Errno::EADDRNOTAVAIL on 0.0.0.0 (windows7). It also appears there is no platform guard on rspec, maybe I was thinking of rubinius's mspec. it looks like mongrel is skipped on a LoadError. I can look into the errors if you want, but otherwise windows at least boots the tests. the most frequent error comes from the system, with 'address not available in this context' as the exception message. the other error relates to a Server header not being set with webrick. excuse the typing, message sent from an iPad.

Lars
Collaborator

We might want to spawn the spec adapters on 127.0.0.1 instead (regardless of this issue).

Deleted user

yeah, ipconfig /all does not list 0.0.0.0 or 127.0.0.1 on my computer. a quick search on google suggests that may be the problem on my end.

Deleted user

127.0.0.1 is ping-able on my side, but my windows7 configuration is probably to blame for the failures. I won't have access to a better network for a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 19, 2014
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 spec/spec_helper.rb
8 spec/spec_helper.rb
View
@@ -1,6 +1,12 @@
require "bundler/setup"
Bundler.require :default, :test, :webservers
require 'logger'
+
+class NullLogger < Logger
+ def add(severity, message=nil, progname=nil, &block)
+ end
+end
+
RSpec.configure do |config|
config.mock_with :rspec
config.filter_run :focus => true
@@ -14,7 +20,7 @@
config.before(:suite) do
options = {
- :Logger => Logger.new("/dev/null"),
+ :Logger => NullLogger.new(STDERR),
:AccessLog => []
}
Webmachine::Adapters::WEBrick::DEFAULT_OPTIONS.merge! options
Something went wrong with that request. Please try again.