Skip to content

Commit

Permalink
fix specs
Browse files Browse the repository at this point in the history
  • Loading branch information
omkarmoghe committed Apr 19, 2024
1 parent 3f692e8 commit 3a3a6d4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/test_experiment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ def publish!(result)
def setup
@experiment = TestExperiment.new("test-experiment")
@control = LabCoat::Observation.new("control", @experiment) do
@experiment.control(2)
@experiment.control
end
end

def test_enabled?
refute(@experiment.enabled?(1))
assert(@experiment.enabled?(2))
@experiment.instance_variable_set(:@context, { num: 1 })
refute(@experiment.enabled?)
@experiment.instance_variable_set(:@context, { num: 2 })
assert(@experiment.enabled?)
@experiment.instance_variable_set(:@context, {})
end

def test_compare
Expand Down

0 comments on commit 3a3a6d4

Please sign in to comment.