Block has too many lines. [173/25]
RSpec.describe SiteData::AuthorData do
before do
root = File.dirname(File.dirname(__FILE__))
@author_data = described_class.new(root)
Block has too many lines. [67/25]
context 'with YAML frontmatter -- ' do
it 'confirms that a exists' do
exists = @author_data.exists? 'author'
expect(exists).to eq true
end
Block has too many lines. [55/25]
context 'given a file with content and YAML frontmatter' do
it 'confirms that a exists' do
exists = @author_data.exists? 'author_with_content'
expect(exists).to eq true
end
Block has too many lines. [38/25]
describe 'class variables' do
it "generates a list of 'published_authors'" do
expect(@published_authors).to be_kind_of(Array)
expect(@published_authors).not_to be_empty
expect(@published_authors.size).to be > 0
Similar blocks of code found in 2 locations. Consider refactoring.
it 'can update and leave the content intact' do
author_name = @author_data.fetch('author_with_content', 'name')
expect(author_name).to eq 'burt'
file_path = @author_data.create_file_path('author_with_content')
Similar blocks of code found in 2 locations. Consider refactoring.
it 'can update and leave the content intact' do
author_name = @author_data.fetch('author', 'name')
expect(author_name).to eq 'aaron'
file_path = @author_data.create_file_path('author')
Similar blocks of code found in 4 locations. Consider refactoring.
it 'can update a file by referencing a file extension' do
author_name = @author_data.fetch('author_with_content', 'name')
expect(author_name).to eq 'burt'
@author_data.update('author_with_content.md', 'name', 'brian')
Similar blocks of code found in 4 locations. Consider refactoring.
it 'can update a file by referencing a file extension' do
author_name = @author_data.fetch('author', 'name')
expect(author_name).to eq 'aaron'
@author_data.update('author.md', 'name', 'brian')
Similar blocks of code found in 4 locations. Consider refactoring.
it 'can update a file without referencing a file extension' do
author_name = @author_data.fetch('author_with_content', 'name')
expect(author_name).to eq 'burt'
@author_data.update('author_with_content', 'name', 'brian')
Similar blocks of code found in 4 locations. Consider refactoring.
it 'can update a file without referencing a file extension' do
author_name = @author_data.fetch('author', 'name')
expect(author_name).to eq 'aaron'
@author_data.update('author', 'name', 'brian')
Similar blocks of code found in 2 locations. Consider refactoring.
it 'does not update a file if it does not need updating' do
author_name = @author_data.fetch('author_with_content', 'name')
expect(author_name).to eq 'burt'
@author_data.update('author_with_content.md', 'name', 'burt')
Similar blocks of code found in 2 locations. Consider refactoring.
it 'does not update a file if it does not need updating' do
author_name = @author_data.fetch('author', 'name')
expect(author_name).to eq 'aaron'
@author_data.update('author.md', 'name', 'aaron')
There are no issues that match your filters.