From 812bf65141a92639c850992a8d82d1e3689bb44e Mon Sep 17 00:00:00 2001 From: Philipe Fatio Date: Fri, 1 Nov 2013 00:15:59 +0100 Subject: [PATCH] Don't test hpricot on JRuby JRuby does not work with hpricot in the current version. --- premailer-rails.gemspec | 2 +- spec/lib/customized_premailer_spec.rb | 2 ++ spec/spec_helper.rb | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/premailer-rails.gemspec b/premailer-rails.gemspec index 6622626..6736d88 100644 --- a/premailer-rails.gemspec +++ b/premailer-rails.gemspec @@ -28,5 +28,5 @@ Gem::Specification.new do |s| s.add_development_dependency 'mocha' s.add_development_dependency 'mail' s.add_development_dependency 'nokogiri' - s.add_development_dependency 'hpricot' + s.add_development_dependency 'hpricot' unless RUBY_PLATFORM == 'java' end diff --git a/spec/lib/customized_premailer_spec.rb b/spec/lib/customized_premailer_spec.rb index 37e0a2e..43bc08b 100644 --- a/spec/lib/customized_premailer_spec.rb +++ b/spec/lib/customized_premailer_spec.rb @@ -4,6 +4,8 @@ describe Premailer::Rails::CustomizedPremailer do [ :nokogiri, :hpricot ].each do |adapter| + next if adapter == :hpricot and RUBY_PLATFORM == 'java' + context "when adapter is #{adapter}" do before { Premailer::Adapter.stubs(:use).returns(adapter) } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7b8c0ae..9b7d61c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,7 +5,7 @@ require 'fixtures/message' require 'fixtures/html' -require 'hpricot' +require 'hpricot' unless RUBY_PLATFORM == 'java' require 'nokogiri' RSpec.configure do |config|