Skip to content

Commit

Permalink
Use better paths
Browse files Browse the repository at this point in the history
  • Loading branch information
waferbaby committed Jan 16, 2024
1 parent 291d783 commit 7297718
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/dimples/document_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

describe Dimples::Document do
context 'when a file-based document' do
subject(:document) { described_class.new('spec/fixtures/document.markdown') }
subject(:document) { described_class.new(File.join(File.dirname(__dir__), 'fixtures', 'document.markdown')) }

it 'reads in its frontmatter' do
expect(document.metadata).to eql(
Expand Down
5 changes: 3 additions & 2 deletions spec/dimples/site_spec.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# frozen_string_literal: true

require 'dimples'
require 'tmpdir'

describe Dimples::Site do
subject(:site) { described_class.new(source_path, output_path, config) }

let(:source_path) { File.join(__dir__, 'fixtures') }
let(:output_path) { File.join(__dir__, 'my_site') }
let(:source_path) { File.join(File.dirname(__dir__), 'fixtures') }
let(:output_path) { Dir.mktmpdir }
let(:config) { { overwrite_directory: true } }

describe '#initialize' do
Expand Down

0 comments on commit 7297718

Please sign in to comment.