Sha256: 932154e23d4e5d7100bf590503f551e242ff770edf55e88791ffe8c670d40b06
Contents?: true
Size: 816 Bytes
Versions: 1
Compression:
Stored size: 816 Bytes
Contents
require 'test_helper' require_relative '../lib/sandi_meter/rules_checker' describe SandiMeter::RulesChecker do let(:conditions) do { first_rule: { small_classes_amount: 1, total_classes_amount: 2 }, second_rule: { small_methods_amount: 2, total_methods_amount: 2 }, third_rule: { proper_method_calls: 2, total_method_calls: 2 }, fourth_rule: { proper_controllers_amount: 2, total_controllers_amount: 2 } } end describe "#ok?" do it "returns false with 100 threshold" do expect(SandiMeter::RulesChecker.new(conditions, {thresholds: [100, 100, 100, 100]})).to_not be_ok end it "returns true with threshold less than 100" do expect(SandiMeter::RulesChecker.new(conditions, {thresholds: [50, 100, 100, 100]})).to be_ok end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sandi_meter-1.2.0 | spec/rules_checker_spec.rb |