Skip to content

Commit

Permalink
Skip mongrel adapter spec reliably across platforms
Browse files Browse the repository at this point in the history
`return` from main scope is a SyntaxError on 1.9.2.
  • Loading branch information
bernerdschaefer committed Jan 11, 2012
1 parent 40b9d38 commit 67b9d97
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions spec/webmachine/adapters/mongrel_spec.rb
@@ -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

0 comments on commit 67b9d97

Please sign in to comment.