Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
rake test task actually runs tests now
  • Loading branch information
joshgoebel committed Feb 21, 2009
1 parent 2b50d47 commit 9a3700a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
9 changes: 8 additions & 1 deletion Rakefile
Expand Up @@ -15,9 +15,16 @@ task :install => [:package] do
sh %{sudo gem install pkg/#{spec.name}-#{spec.version}}
end

task :default => [:test]

Rake::TestTask.new do |t|
if ENV["API_KEY"].nil?
puts "Please specify the API_KEY on the command line for testing."
exit
end

t.libs << "test"
t.test_files = FileList['test/test*.rb']
t.test_files = FileList['test/*_test.rb']
t.verbose = true
end

Expand Down
4 changes: 2 additions & 2 deletions test/campaign_monitor_test.rb
@@ -1,15 +1,15 @@
require 'rubygems'
require 'campaign_monitor'
require 'test/unit'
require 'test/test_helper'

CAMPAIGN_MONITOR_API_KEY = 'Your API Key'
CLIENT_NAME = 'Spacely Space Sprockets'
LIST_NAME = 'List #1'

class CampaignMonitorTest < Test::Unit::TestCase

def setup
@cm = CampaignMonitor.new(ENV["API_KEY"] || CAMPAIGN_MONITOR_API_KEY)
@cm = CampaignMonitor.new(ENV["API_KEY"])
# find an existing client
@client=find_test_client
assert_not_nil @client, "Please create a '#{CLIENT_NAME}' (company name) client so tests can run."
Expand Down
3 changes: 1 addition & 2 deletions test/client_test.rb
Expand Up @@ -3,15 +3,14 @@
require 'test/unit'
require 'test/test_helper'

CAMPAIGN_MONITOR_API_KEY = 'Your API Key'
CLIENT_NAME = 'Spacely Space Sprockets'
CLIENT_CONTACT_NAME = 'George Jetson'
LIST_NAME = 'List #1'

class CampaignMonitorTest < Test::Unit::TestCase

def setup
@cm = CampaignMonitor.new(ENV["API_KEY"] || CAMPAIGN_MONITOR_API_KEY)
@cm = CampaignMonitor.new(ENV["API_KEY"])
# find an existing client and make sure we know it's values
@client=find_test_client
assert_not_nil @client, "Please create a '#{CLIENT_NAME}' (company name) client so tests can run."
Expand Down
4 changes: 2 additions & 2 deletions test/list_test.rb
@@ -1,15 +1,15 @@
require 'rubygems'
require 'campaign_monitor'
require 'test/unit'
require 'test/test_helper'

CAMPAIGN_MONITOR_API_KEY = 'Your API Key'
CLIENT_NAME = 'Spacely Space Sprockets'
LIST_NAME = 'List #1'

class CampaignMonitorTest < Test::Unit::TestCase

def setup
@cm = CampaignMonitor.new(ENV["API_KEY"] || CAMPAIGN_MONITOR_API_KEY)
@cm = CampaignMonitor.new(ENV["API_KEY"])
# find an existing client

@client=find_test_client
Expand Down

0 comments on commit 9a3700a

Please sign in to comment.