test/lib/rubycritic/analysers/smells/flog_test.rb in rubycritic-2.6.0 vs test/lib/rubycritic/analysers/smells/flog_test.rb in rubycritic-2.7.0
- old
+ new
@@ -1,25 +1,25 @@
-require "analysers_test_helper"
-require "rubycritic/analysers/smells/flog"
+require 'analysers_test_helper'
+require 'rubycritic/analysers/smells/flog'
describe Rubycritic::Analyser::FlogSmells do
- context "when analysing a complex file" do
+ context 'when analysing a complex file' do
before do
- @analysed_module = AnalysedModuleDouble.new(:path => "test/samples/flog/smelly.rb", :smells => [])
+ @analysed_module = AnalysedModuleDouble.new(path: 'test/samples/flog/smelly.rb', smells: [])
analysed_modules = [@analysed_module]
Rubycritic::Analyser::FlogSmells.new(analysed_modules).run
end
- it "detects its smells" do
+ it 'detects its smells' do
@analysed_module.smells.length.must_equal 1
end
- it "creates smells with messages" do
+ it 'creates smells with messages' do
smell = @analysed_module.smells.first
smell.message.must_be_instance_of String
end
- it "creates smells with scores" do
+ it 'creates smells with scores' do
smell = @analysed_module.smells.first
smell.score.must_be :>, 0
end
end
end