Skip to content

Commit

Permalink
test 2
Browse files Browse the repository at this point in the history
  • Loading branch information
khiemgluong committed May 20, 2024
1 parent d46f512 commit 5a3b07c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
16 changes: 16 additions & 0 deletions spec/jekyll/obsidian_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# frozen_string_literal: true
require "spec_helper"

RSpec.describe Jekyll::Obsidian do
it "has a version number" do
Expand All @@ -9,3 +10,18 @@
expect(false).to eq(true)
end
end
# spec/jekyll/obsidian_spec.rb

require "spec_helper"

RSpec.describe Jekyll::Obsidian::FileTreeGenerator do
it "generates a file tree" do
site = double("site")
allow(site).to receive(:config).and_return({ "file_tree_source" => "source_dir" })
allow(site).to receive(:source).and_return("source_dir")
allow(site).to receive(:data).and_return({})

generator = Jekyll::Obsidian::FileTreeGenerator.new
expect { generator.generate(site) }.not_to raise_error
end
end
7 changes: 2 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# frozen_string_literal: true
require "spec_helper"

require "jekyll"
require "jekyll/obsidian"

RSpec.configure do |config|
Expand All @@ -12,8 +13,4 @@
config.expect_with :rspec do |c|
c.syntax = :expect
end
RSpec.describe Jekyll::Obsidian::FileTreeGenerator do
it "generates a file tree" do
# Your test code here
end
end

0 comments on commit 5a3b07c

Please sign in to comment.