Sha256: 17e25f8176ec3e61fc00b54012c48f641e5d5f211c61e255b1059dda54d30d5f
Contents?: true
Size: 780 Bytes
Versions: 4
Compression:
Stored size: 780 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, {threshold: 100})).to_not be_ok end it "returns true with threshold less than 100" do expect(SandiMeter::RulesChecker.new(conditions, {threshold: 50})).to be_ok end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
sandi_meter-1.1.8 | spec/rules_checker_spec.rb |
sandi_meter-1.1.7 | spec/rules_checker_spec.rb |
sandi_meter-1.1.6 | spec/rules_checker_spec.rb |
sandi_meter-1.1.5 | spec/rules_checker_spec.rb |