Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip mongrel adapter spec reliably across platforms
`return` from main scope is a SyntaxError on 1.9.2.
- Loading branch information
1 parent
40b9d38
commit 67b9d97
Showing
1 changed file
with
15 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
require "spec_helper" | ||
|
||
if RUBY_PLATFORM =~ /java/ | ||
warn "Platform is #{RUBY_PLATFORM}: skipping mongrel adapter spec." | ||
return | ||
end | ||
|
||
describe Webmachine::Adapters::Mongrel do | ||
let(:configuration) { Webmachine::Configuration.default } | ||
let(:dispatcher) { Webmachine::Dispatcher.new } | ||
begin | ||
describe Webmachine::Adapters::Mongrel do | ||
let(:configuration) { Webmachine::Configuration.default } | ||
let(:dispatcher) { Webmachine::Dispatcher.new } | ||
|
||
let(:adapter) do | ||
described_class.new(configuration, dispatcher) | ||
end | ||
let(:adapter) do | ||
described_class.new(configuration, dispatcher) | ||
end | ||
|
||
it "inherits from Webmachine::Adapter" do | ||
adapter.should be_a_kind_of(Webmachine::Adapter) | ||
end | ||
it "inherits from Webmachine::Adapter" do | ||
adapter.should be_a_kind_of(Webmachine::Adapter) | ||
end | ||
|
||
it "implements #run" do | ||
described_class.instance_methods(false).map {|m| m.to_sym }.should include :run | ||
it "implements #run" do | ||
described_class.instance_methods(false).map {|m| m.to_sym }.should include :run | ||
end | ||
end | ||
rescue LoadError | ||
warn "Platform is #{RUBY_PLATFORM}: skipping mongrel adapter spec." | ||
end |