Skip to content

Commit

Permalink
No need to run these tests 10 times
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Mar 4, 2012
1 parent ac114a8 commit 86ed1be
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions spec/helper_spec.rb
Expand Up @@ -372,14 +372,12 @@
ab_test('link_color', 'blue', 'red')
end
it 'should always use first alternative' do
10.times do
ab_test('link_color', 'blue', 'red').should eq('blue')
ab_test('link_color', 'blue' => 0.01, 'red' => 0.2).should eq('blue')
ab_test('link_color', {'blue' => 0.8}, {'red' => 20}).should eq('blue')
ab_test('link_color', 'blue', 'red') do |alternative|
"shared/#{alternative}"
end.should eq('shared/blue')
end
ab_test('link_color', 'blue', 'red').should eq('blue')
ab_test('link_color', 'blue' => 0.01, 'red' => 0.2).should eq('blue')
ab_test('link_color', {'blue' => 0.8}, {'red' => 20}).should eq('blue')
ab_test('link_color', 'blue', 'red') do |alternative|
"shared/#{alternative}"
end.should eq('shared/blue')
end
end

Expand Down

0 comments on commit 86ed1be

Please sign in to comment.