diff options
author | Alex Braha Stoll <alexbrahastoll@gmail.com> | 2016-12-31 22:27:03 +0300 |
---|---|---|
committer | Alex Braha Stoll <alexbrahastoll@gmail.com> | 2016-12-31 22:27:03 +0300 |
commit | 48417893d7456dc0d46b0a514a2326cc8ce6076f (patch) | |
tree | 3c39ca881f25fd2cafd9fbe3ba3693874c2325f7 /spec/models/wiki_directory_spec.rb | |
parent | b0ad4e0e87c642efefa840eeeea5824191e81405 (diff) |
Remove directories as one of the attributes of WikiDirectory
Diffstat (limited to 'spec/models/wiki_directory_spec.rb')
-rw-r--r-- | spec/models/wiki_directory_spec.rb | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/spec/models/wiki_directory_spec.rb b/spec/models/wiki_directory_spec.rb index fac70f8d3c7..1caaa557085 100644 --- a/spec/models/wiki_directory_spec.rb +++ b/spec/models/wiki_directory_spec.rb @@ -8,10 +8,9 @@ RSpec.describe WikiDirectory, models: true do end describe '#initialize' do - context 'when there are pages and directories' do + context 'when there are pages' do let(:pages) { [build(:wiki_page)] } - let(:other_directories) { [build(:wiki_directory)] } - let(:directory) { WikiDirectory.new('/path_up_to/dir', pages, other_directories) } + let(:directory) { WikiDirectory.new('/path_up_to/dir', pages) } it 'sets the slug attribute' do expect(directory.slug).to eq('/path_up_to/dir') @@ -20,13 +19,9 @@ RSpec.describe WikiDirectory, models: true do it 'sets the pages attribute' do expect(directory.pages).to eq(pages) end - - it 'sets the directories attribute' do - expect(directory.directories).to eq(other_directories) - end end - context 'when there are no pages or directories' do + context 'when there are no pages' do let(:directory) { WikiDirectory.new('/path_up_to/dir') } it 'sets the slug attribute' do @@ -36,10 +31,6 @@ RSpec.describe WikiDirectory, models: true do it 'sets the pages attribute to an empty array' do expect(directory.pages).to eq([]) end - - it 'sets the directories attribute to an empty array' do - expect(directory.directories).to eq([]) - end end end |