-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
57 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
require "./spec_helper" | ||
|
||
module GitRepository | ||
describe GitRepository::Generic do | ||
client = Generic.new("https://github.com/PlaceOS/drivers") | ||
|
||
it "should list files in the repository" do | ||
# all files | ||
files = client.file_list | ||
files.includes?("drivers/ubipark/api.cr").should be_true | ||
|
||
# files from an earlier commit | ||
files = client.file_list("c0536e9c7b5bfe6e40e850717f377846090f50ea") | ||
files.includes?("drivers/ubipark/api.cr").should be_false | ||
|
||
# files filtered by folder | ||
files.includes?("shard.yml").should be_true | ||
|
||
files = client.file_list(path: "drivers/") | ||
files.includes?("drivers/ubipark/api.cr").should be_true | ||
files.includes?("shard.yml").should be_false | ||
end | ||
end | ||
end |
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
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