Skip to content

Commit

Permalink
Refactored deleting specs a little
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew committed Jun 15, 2011
1 parent ab0c15c commit aab328b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
11 changes: 0 additions & 11 deletions spec/dashboard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,8 @@ def app

it "should delete an experiment" do
experiment = Split::Experiment.find_or_create('link_color', 'blue', 'red')
red = Split::Alternative.find('red', 'link_color').participant_count

red = Split::Alternative.find('red', 'link_color')
blue = Split::Alternative.find('blue', 'link_color')
red.participant_count = 5
red.save
blue.participant_count = 6
blue.save

delete '/link_color'

last_response.should be_redirect

lambda { Split::Experiment.find('link_color') }.should raise_error
end

Expand Down
1 change: 1 addition & 0 deletions spec/experiment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

experiment.delete
Split.redis.exists('basket_text').should be false
lambda { Split::Experiment.find('link_color') }.should raise_error
end

describe 'new record?' do
Expand Down

0 comments on commit aab328b

Please sign in to comment.