Skip to content

Commit

Permalink
Added first little shoulda tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrussell committed Oct 15, 2009
1 parent d89f27d commit c520687
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@
coverage
rdoc
pkg
test/user_credentials.yaml
2 changes: 1 addition & 1 deletion lib/freeagent/timeslip.rb
Expand Up @@ -24,4 +24,4 @@ def self.find(timeslip_id)
end
end

module Freeagent
end
29 changes: 27 additions & 2 deletions test/freeagent_api_test.rb
@@ -1,7 +1,32 @@
require 'test_helper'
require 'yaml'

class FreeagentApiTest < Test::Unit::TestCase
should "probably rename this file and start testing for real" do
flunk "hey buddy, you should probably rename this file and start testing for real"

include Freeagent

context "Before we do anything, we" do
setup do
@config ||= YAML.load_file 'test/user_credentials.yaml'
end
should "set the domain" do
assert Freeagent.domain = @config['domain']
end
should "set the username" do
assert Freeagent.username = @config['username']
end
should "set the password" do
assert Freeagent.password = @config['password']
end
end

context "Many projects" do
setup do
@projects = Project.find_all
end
should "be in an array" do
assert @projects.is_a? Array
end
end

end

0 comments on commit c520687

Please sign in to comment.