Skip to content

Commit

Permalink
Backport fixes for specs on Ruby 1.9.3+
Browse files Browse the repository at this point in the history
Avoid gems which dropped support for Ruby 1.8:
- activesupport (4.0.0) requires ruby (>= 1.9.3)
- rake (11.0.1) requires ruby (>= 1.9.3)

Backport 6e12d7f to fix #453.

Backport db7c955 to fix a brittle spec.

References #958
  • Loading branch information
wktk authored and jeremy committed May 15, 2017
1 parent 6110413 commit b5a2884
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
22 changes: 18 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@ source 'https://rubygems.org'

gemspec

gem "rake", "< 11.0" if RUBY_VERSION < '1.9.3'

gem "treetop", "~> 1.4.10"
gem "mime-types", "~> 1.16"
gem 'activesupport', '>= 2.3.6' if RUBY_VERSION >= '1.9.3'
gem 'activesupport', '>= 2.3.6', '< 4.0.0' if RUBY_VERSION < '1.9.3'
gem "tlsmail" if RUBY_VERSION <= '1.8.6'
gem "mime-types", "~> 1.16"
gem "treetop", "~> 1.4.10"

gem 'jruby-openssl', :platform => :jruby

# For gems not required to run tests
group :local_development, :test do
gem 'rake', '> 0.8.7' if RUBY_VERSION >= '1.9.3'
gem 'rake', '> 0.8.7', '< 11.0.1' if RUBY_VERSION < '1.9.3'
gem 'rdoc', '< 5' if RUBY_VERSION < '1.9'
gem "rspec", "~> 2.8.0"
case
when defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
# Skip it
when RUBY_PLATFORM == 'java'
# Skip it
when RUBY_VERSION < '1.9'
gem "ruby-debug"
else
# Skip it
end
end
4 changes: 4 additions & 0 deletions spec/mail/message_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ def basic_email

describe "YAML serialization" do
before(:each) do
# Ensure specs don't randomly fail due to messages being generated 1 second apart
time = DateTime.now
DateTime.stub(:now).and_return(time)

@yaml_mail = Mail::Message.new(:to => '[email protected]',
:cc => '[email protected]',
:bcc => '[email protected]',
Expand Down

0 comments on commit b5a2884

Please sign in to comment.