Permalink
Browse files

Only run Reel specs on Ruby 1.9

  • Loading branch information...
1 parent 5c09bb8 commit 5fdedc038ca8ba209189535c7ba94b065321cce6 @tarcieri tarcieri committed Aug 18, 2012
Showing with 22 additions and 18 deletions.
  1. +4 −2 .travis.yml
  2. +17 −15 spec/webmachine/adapters/reel_spec.rb
  3. +1 −1 webmachine.gemspec
View
@@ -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
@@ -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
@@ -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 Aug 18, 2012 Contributor

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
tarcieri Aug 18, 2012 Contributor

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

Do you have a better suggestion?

@tarcieri
tarcieri Aug 19, 2012 Contributor

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

gem.add_development_dependency(%q<hatetepe>, ['~> 0.5'])
gem.add_development_dependency(%q<rack>)
gem.add_development_dependency(%q<rack-test>)

0 comments on commit 5fdedc0

Please sign in to comment.