test/experiment_test.rb in verdict-0.8.0 vs test/experiment_test.rb in verdict-0.9.0

- old
+ new

@@ -32,11 +32,11 @@ assert_equal e.group(:all), qualified.group non_qualified = e.assign(us_subject) assert_kind_of Verdict::Assignment, non_qualified refute non_qualified.qualified? - assert_equal nil, non_qualified.group + assert_nil non_qualified.group end def test_multiple_qualifier e = Verdict::Experiment.new('test') do |experiment| qualify { |subject| subject.language == 'fr' } @@ -62,11 +62,11 @@ assert_equal e.group(:all), qualified.group non_qualified = e.assign(en_subject) assert_kind_of Verdict::Assignment, non_qualified refute non_qualified.qualified? - assert_equal nil, non_qualified.group + assert_nil non_qualified.group end module CountryIsCanadaHelper def country_is_canada(subject, _context) subject.country == 'CA' @@ -99,11 +99,11 @@ assert_equal e.group(:all), qualified.group non_qualified = e.assign(us_subject) assert_kind_of Verdict::Assignment, non_qualified refute non_qualified.qualified? - assert_equal nil, non_qualified.group + assert_nil non_qualified.group end def test_disqualify_empty_identifier e = Verdict::Experiment.new('test', disqualify_empty_identifier: true) do groups do @@ -111,11 +111,11 @@ group :b, :rest end end refute e.assign(nil).qualified? - assert_equal nil, e.convert('', :mygoal) + assert_nil e.convert('', :mygoal) end def test_assignment e = Verdict::Experiment.new('test') do qualify { |subject| subject <= 2 } @@ -137,10 +137,10 @@ assert_kind_of Verdict::Assignment, assignment refute assignment.qualified? assert_equal :a, e.switch(1) assert_equal :b, e.switch(2) - assert_equal nil, e.switch(3) + assert_nil e.switch(3) end def test_experiment_without_manual_assignment_timestamps_option e = Verdict::Experiment.new('test') do groups { group :all, 100 }