Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…tation into nicolaa-master
  • Loading branch information
bf4 committed Apr 25, 2024
2 parents c1a782d + 269213b commit 6c6f651
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/rspec_api_documentation/writers/append_json_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Writers
class AppendJsonWriter < JsonWriter
def write
index_file = docs_dir.join("index.json")
if File.exists?(index_file) && (output = File.read(index_file)).length >= 2
if File.exist?(index_file) && (output = File.read(index_file)).length >= 2
existing_index_hash = JSON.parse(output)
end
File.open(index_file, "w+") do |f|
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec_api_documentation/writers/writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def self.write(index, configuration)
end

def self.clear_docs(docs_dir)
if File.exists?(docs_dir)
if File.exist?(docs_dir)
FileUtils.rm_rf(docs_dir, :secure => true)
end
FileUtils.mkdir_p(docs_dir)
Expand Down
2 changes: 1 addition & 1 deletion spec/api_documentation_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
subject.clear_docs

expect(File.directory?(configuration.docs_dir)).to be_truthy
expect(File.exists?(test_file)).to be_falsey
expect(File.exist?(test_file)).to be_falsey
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/writers/html_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

writer.write
index_file = File.join(configuration.docs_dir, "index.html")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/writers/json_iodocs_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
it "should write the index" do
writer.write
index_file = File.join(configuration.docs_dir, "apiconfig.json")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
2 changes: 1 addition & 1 deletion spec/writers/json_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
it "should write the index" do
writer.write
index_file = File.join(configuration.docs_dir, "index.json")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
2 changes: 1 addition & 1 deletion spec/writers/markdown_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

writer.write
index_file = File.join(configuration.docs_dir, "index.md")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/writers/slate_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

writer.write
index_file = File.join(configuration.docs_dir, "index.html.md")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/writers/textile_writer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

writer.write
index_file = File.join(configuration.docs_dir, "index.textile")
expect(File.exists?(index_file)).to be_truthy
expect(File.exist?(index_file)).to be_truthy
end
end
end
Expand Down

0 comments on commit 6c6f651

Please sign in to comment.