Permalink
Browse files

Merge pull request #3 from lukerandall/patch-1

Don't subscribe in tests.
  • Loading branch information...
2 parents 4fcdc52 + 2bb134a commit 8389e2f17efddc5186105ebcce63b7da096025a1 mpowered committed Aug 19, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/campaign_monitor_subscriber.rb
View
2 lib/campaign_monitor_subscriber.rb
@@ -4,7 +4,7 @@ module CampaignMonitorSubscriber
::CAMPAIGN_MONITOR_API_KEY = CM_CONFIG['api_key']
def subscribe_me_using(email_field, custom_fields={})
- return if CM_CONFIG[::Rails.env] == false
+ return if CM_CONFIG[::Rails.env] == false or %w(cucumber test).include? ::Rails.env
after_create do |record|
begin
custom_fields = custom_fields.inject({}) { |h, (k, v)| h[k] = record.send(v); h }

0 comments on commit 8389e2f

Please sign in to comment.