forked from zipmark/rspec_api_documentation
-
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.
Some tests needed updating for newer versions of gems
- Loading branch information
Showing
7 changed files
with
66 additions
and
65 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
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Given /^I move the sample image into the workspace$/ do | ||
FileUtils.cp("features/fixtures/file.png", current_dir) | ||
FileUtils.cp("features/fixtures/file.png", expand_path(".")) | ||
end | ||
|
||
Then /^the generated documentation should be encoded correctly$/ do | ||
file = File.read(File.join(current_dir, "doc", "api", "foobars", "uploading_a_file.html")) | ||
file = File.read(File.join(expand_path("."), "doc", "api", "foobars", "uploading_a_file.html")) | ||
expect(file).to match(/file\.png/) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
Then /^the file "(.*?)" should contain JSON exactly like:$/ do |file, exact_content| | ||
prep_for_fs_check do | ||
json = IO.read(file) | ||
expect(JSON.parse(json)).to eq(JSON.parse(exact_content)) | ||
end | ||
expect(JSON.parse(read(file).join)).to eq(JSON.parse(exact_content)) | ||
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