spec/metric_spec.rb in split-0.7.2 vs spec/metric_spec.rb in split-0.7.3
- old
+ new
@@ -3,28 +3,28 @@
describe Split::Metric do
describe 'possible experiments' do
it "should load the experiment if there is one, but no metric" do
experiment = Split::Experiment.find_or_create('color', 'red', 'blue')
- Split::Metric.possible_experiments('color').should == [experiment]
+ expect(Split::Metric.possible_experiments('color')).to eq([experiment])
end
it "should load the experiments in a metric" do
experiment1 = Split::Experiment.find_or_create('color', 'red', 'blue')
experiment2 = Split::Experiment.find_or_create('size', 'big', 'small')
metric = Split::Metric.new(:name => 'purchase', :experiments => [experiment1, experiment2])
metric.save
- Split::Metric.possible_experiments('purchase').should include(experiment1, experiment2)
+ expect(Split::Metric.possible_experiments('purchase')).to include(experiment1, experiment2)
end
it "should load both the metric experiments and an experiment with the same name" do
experiment1 = Split::Experiment.find_or_create('purchase', 'red', 'blue')
experiment2 = Split::Experiment.find_or_create('size', 'big', 'small')
metric = Split::Metric.new(:name => 'purchase', :experiments => [experiment2])
metric.save
- Split::Metric.possible_experiments('purchase').should include(experiment1, experiment2)
+ expect(Split::Metric.possible_experiments('purchase')).to include(experiment1, experiment2)
end
end
end