Sha256: 87cc0fc4cdb8cb44195e7a6d7329cff4f367a1b1127d15df06e2943964fe4b2f

Contents?: true

Size: 550 Bytes

Versions: 1

Compression:

Stored size: 550 Bytes

Contents

require "test_helper"
require "rubycritic/adapters/smell/flay"

describe Rubycritic::SmellAdapter::Flay do
  before do
    sample_paths = ["test/samples/flay/smelly.rb"]
    @adapter = Rubycritic::SmellAdapter::Flay.new(sample_paths)
  end

  it "detects smells" do
    @adapter.smells.wont_be_empty
  end

  it "has smells with messages" do
    smell = @adapter.smells.first
    smell.message.must_equal "found in 2 nodes"
  end

  it "has smells with messages" do
    smell = @adapter.smells.first
    smell.score.must_be_kind_of Numeric
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubycritic-0.0.12 test/lib/rubycritic/smell_adapters/flay_test.rb