Skip to content

Commit

Permalink
Refactor spec code
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagopradi committed Sep 27, 2013
1 parent 2b45b87 commit 05f54ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions spec/octopus/proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
end

it "should save all associated objects on the correct shard" do
subject.should_not raise_error
expect { subject }.to_not raise_error
end
end

Expand All @@ -265,7 +265,7 @@
end

it "should save all associated objects on the correct shard" do
subject.should_not raise_error
expect { subject }.to_not raise_error
end
end
end
Expand Down
10 changes: 3 additions & 7 deletions spec/support/octopus_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ def self.clean_all_shards(shards)
BlankModel.using(shard_symbol).connection.execute("DELETE FROM #{tables}")
end

if shard_symbol == :alone_shard
%w[
mmorpg_players
weapons
skills
].each do |table|
BlankModel.using(shard_symbol).connection.execute("DELETE FROM #{tables}")
if shard_symbol == 'alone_shard'
['mmorpg_players', 'weapons', 'skills'].each do |table|
BlankModel.using(shard_symbol).connection.execute("DELETE FROM #{table}")
end
end
end
Expand Down

0 comments on commit 05f54ec

Please sign in to comment.