forked from fcoury/octopi
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Library now handles new attributes in API without issue
- Loading branch information
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
require File.join(File.dirname(__FILE__), 'test_helper') | ||
|
||
class BaseTest < Test::Unit::TestCase | ||
class SparseUser < Octopi::Base | ||
include Octopi::Resource | ||
|
||
attr_accessor :some_attribute | ||
|
||
find_path "/user/search/:query" | ||
resource_path "/user/show/:id" | ||
end | ||
|
||
def setup | ||
fake_everything | ||
end | ||
|
||
should "not raise an error if it doesn't know about the attributes that GitHub API provides" do | ||
assert_nothing_raised { SparseUser.find("radar") } | ||
end | ||
end |