Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only run Reel specs on Ruby 1.9

  • Loading branch information...
commit 5fdedc038ca8ba209189535c7ba94b065321cce6 1 parent 5c09bb8
@tarcieri tarcieri authored
View
6 .travis.yml
@@ -2,6 +2,8 @@ rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- - rbx
- - jruby
+ - jruby-18mode
+ - jruby-19mode
+ - rbx-18mode
+ - rbx-19mode
bundler_args: --without=guard,docs
View
32 spec/webmachine/adapters/reel_spec.rb
@@ -1,21 +1,23 @@
require 'spec_helper'
-describe Webmachine::Adapters::Reel do
- let(:configuration) { Webmachine::Configuration.default }
- let(:dispatcher) { Webmachine::Dispatcher.new }
- let(:adapter) do
- described_class.new(configuration, dispatcher)
- end
+if RUBY_VERSION >= "1.9"
+ describe Webmachine::Adapters::Reel do
+ let(:configuration) { Webmachine::Configuration.default }
+ let(:dispatcher) { Webmachine::Dispatcher.new }
+ 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
- adapter.should respond_to(:run)
- end
+ it 'implements #run' do
+ adapter.should respond_to(:run)
+ end
- it 'implements #process' do
- adapter.should respond_to(:process)
- end
+ it 'implements #process' do
+ adapter.should respond_to(:process)
+ end
+ end
end
View
2  webmachine.gemspec
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency(%q<yard>, ["~> 0.7.3"])
gem.add_development_dependency(%q<rake>)
gem.add_development_dependency(%q<mongrel>, ['~>1.2.beta'])
- gem.add_development_dependency(%q<reel>, ['>= 0.1.0'])
+ gem.add_development_dependency(%q<reel>, ['>= 0.1.0']) if RUBY_VERSION >= "1.9"
@lgierth
lgierth added a note

The .gemspec is only being evaluated when building the gem and when developing using Bundler, so this will result in different gems being built depending on the Ruby version you run gem build on.

@tarcieri Collaborator

It's a development dependency. Is that really an issue?

Do you have a better suggestion?

@tarcieri Collaborator

An alternative might be to pull development dependencies in through the Gemfile instead of the gemspec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
gem.add_development_dependency(%q<hatetepe>, ['~> 0.5'])
gem.add_development_dependency(%q<rack>)
gem.add_development_dependency(%q<rack-test>)
Please sign in to comment.
Something went wrong with that request. Please try again.