Kill trailing whitespace in ruby files

This commit is contained in:
小太
2013-03-19 23:10:10 +11:00
parent c107f96cec
commit cba839ba76
319 changed files with 2710 additions and 2710 deletions

View File

@@ -10,18 +10,18 @@ class PoolElementsControllerTest < ActionController::TestCase
@post = FactoryGirl.create(:post)
@pool = FactoryGirl.create(:pool, :name => "abc")
end
teardown do
CurrentUser.user = nil
end
context "create action" do
should "add a post to a pool" do
post :create, {:pool_id => @pool.id, :post_id => @post.id, :format => "json"}, {:user_id => @user.id}
@pool.reload
assert_equal([@post.id], @pool.post_id_array)
end
should "add a post to a pool once and only once" do
@pool.add!(@post)
post :create, {:pool_id => @pool.id, :post_id => @post.id, :format => "json"}, {:user_id => @user.id}
@@ -29,18 +29,18 @@ class PoolElementsControllerTest < ActionController::TestCase
assert_equal([@post.id], @pool.post_id_array)
end
end
context "destroy action" do
setup do
@pool.add!(@post)
end
should "remove a post from a pool" do
post :destroy, {:pool_id => @pool.id, :post_id => @post.id, :format => "json"}, {:user_id => @user.id}
@pool.reload
assert_equal([], @pool.post_id_array)
end
should "do nothing if the post is not a member of the pool" do
@pool.remove!(@post)
post :destroy, {:pool_id => @pool.id, :post_id => @post.id, :format => "json"}, {:user_id => @user.id}