Permalink
Browse files

Compat with Ruby 2.0.0, Rails 3.2.13

  • Loading branch information...
nateberkopec committed Mar 27, 2013
1 parent 4b19bc0 commit 21dc5dbc42a0aa80cd4b43e5808275b116c88df0
Showing with 8 additions and 9 deletions.
  1. +0 −6 Gemfile
  2. +1 −1 core/spec/lib/mail_interceptor_spec.rb
  3. +6 −1 core/spec/models/order_spec.rb
  4. +1 −1 core/spree_core.gemspec
View
@@ -18,12 +18,6 @@ group :test do
gem "shoulda-matchers"
end
-if RUBY_VERSION < "1.9"
- gem "ruby-debug"
-else
- gem "ruby-debug19"
-end
-
gemspec
gem 'devise-encryptable'
@@ -2,7 +2,7 @@
# We'll use the OrderMailer as a quick and easy way to test. IF it works here - it works for all email (in theory.)
describe OrderMailer do
- let(:mail_method) { mock("mail_method", :preferred_mails_from => nil, :preferred_intercept_email => nil, :preferred_mail_bcc => nil) }
+ let(:mail_method) { mock("mail_method", :preferred_mails_from => 'example@example.com', :preferred_intercept_email => nil, :preferred_mail_bcc => nil) }
let(:order) { Order.new(:email => "customer@example.com") }
let(:message) { OrderMailer.confirm_email(order) }
#let(:email) { mock "email" }
@@ -8,11 +8,16 @@
let(:order) { FactoryGirl.create(:order) }
let(:gateway) { Gateway::Bogus.new(:name => "Credit Card", :active => true) }
+ let(:mail_method) { mock("mail_method", :preferred_mails_from => 'example@example.com', :preferred_intercept_email => nil, :preferred_mail_bcc => nil) }
+
before do
Gateway.stub :current => gateway
User.stub(:current => mock_model(User, :id => 123))
+ ActionMailer::Base.delivery_method = :test
+ MailMethod.stub :current => mail_method
end
+ after { ActionMailer::Base.deliveries.clear }
context "factory" do
it "should change the Orders count by 1 after factory has been executed" do
@@ -95,7 +100,7 @@
end
context "#finalize!" do
- let(:order) { Order.create }
+ let(:order) { Order.create(:email => 'example@example.com') }
it "should set completed_at" do
order.should_receive :completed_at=
order.finalize!
View
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
s.add_dependency 'rd_resource_controller'
s.add_dependency 'meta_search', '>= 1.1.1'
s.add_dependency 'activemerchant', '= 1.17.0'
- s.add_dependency 'rails', '>= 3.2.0'
+ s.add_dependency 'rails', '>= 3.2.13'
s.add_dependency 'kaminari', '>= 0.12.4'
s.add_dependency "bartt-ssl_requirement", "~> 1.4.2"
end

0 comments on commit 21dc5db

Please sign in to comment.