Skip to content

Commit c80f509

Browse files
committed
Merge branch 'nicolaa-master'
2 parents c1a782d + 6c6f651 commit c80f509

9 files changed

+9
-9
lines changed

lib/rspec_api_documentation/writers/append_json_writer.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Writers
55
class AppendJsonWriter < JsonWriter
66
def write
77
index_file = docs_dir.join("index.json")
8-
if File.exists?(index_file) && (output = File.read(index_file)).length >= 2
8+
if File.exist?(index_file) && (output = File.read(index_file)).length >= 2
99
existing_index_hash = JSON.parse(output)
1010
end
1111
File.open(index_file, "w+") do |f|

lib/rspec_api_documentation/writers/writer.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def self.write(index, configuration)
1414
end
1515

1616
def self.clear_docs(docs_dir)
17-
if File.exists?(docs_dir)
17+
if File.exist?(docs_dir)
1818
FileUtils.rm_rf(docs_dir, :secure => true)
1919
end
2020
FileUtils.mkdir_p(docs_dir)

spec/api_documentation_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
subject.clear_docs
2020

2121
expect(File.directory?(configuration.docs_dir)).to be_truthy
22-
expect(File.exists?(test_file)).to be_falsey
22+
expect(File.exist?(test_file)).to be_falsey
2323
end
2424
end
2525

spec/writers/html_writer_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
writer.write
2929
index_file = File.join(configuration.docs_dir, "index.html")
30-
expect(File.exists?(index_file)).to be_truthy
30+
expect(File.exist?(index_file)).to be_truthy
3131
end
3232
end
3333
end

spec/writers/json_iodocs_writer_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
it "should write the index" do
2626
writer.write
2727
index_file = File.join(configuration.docs_dir, "apiconfig.json")
28-
expect(File.exists?(index_file)).to be_truthy
28+
expect(File.exist?(index_file)).to be_truthy
2929
end
3030
end
3131
end

spec/writers/json_writer_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
it "should write the index" do
2525
writer.write
2626
index_file = File.join(configuration.docs_dir, "index.json")
27-
expect(File.exists?(index_file)).to be_truthy
27+
expect(File.exist?(index_file)).to be_truthy
2828
end
2929
end
3030
end

spec/writers/markdown_writer_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
writer.write
2929
index_file = File.join(configuration.docs_dir, "index.md")
30-
expect(File.exists?(index_file)).to be_truthy
30+
expect(File.exist?(index_file)).to be_truthy
3131
end
3232
end
3333
end

spec/writers/slate_writer_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
writer.write
2929
index_file = File.join(configuration.docs_dir, "index.html.md")
30-
expect(File.exists?(index_file)).to be_truthy
30+
expect(File.exist?(index_file)).to be_truthy
3131
end
3232
end
3333
end

spec/writers/textile_writer_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
writer.write
2929
index_file = File.join(configuration.docs_dir, "index.textile")
30-
expect(File.exists?(index_file)).to be_truthy
30+
expect(File.exist?(index_file)).to be_truthy
3131
end
3232
end
3333
end

0 commit comments

Comments
 (0)