Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit be40902

Browse files
committed
Revert "Rename FindRaid -> ShowRaid"
This reverts commit 8d3e8b4. On second thought, "Show[Item]" just feels weird. Find[Item] is immediately obvious on what you're trying to do.
1 parent 92c4fb5 commit be40902

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

app/controllers/raids_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def update
4747
protected
4848

4949
def find_raid(id)
50-
ShowRaid.new.by_id id.to_i
50+
FindRaid.new.by_id id.to_i
5151
end
5252

5353
def schedule_raid(raid = nil)

app/interactors/show_raid.rb renamed to app/interactors/find_raid.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
##
55
# NOTE: Is this too simple for an Interactor?
66
##
7-
class ShowRaid
7+
class FindRaid
88

99
def by_id(id)
1010
Repository.for(Raid).find(id)

test/integration/raids_controller_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class RaidsControllerTest < ActionController::TestCase
3131
login_as_user
3232

3333
@raid = Raid.new id: 10, when: Date.today, start_at: Time.now, invite_at: Time.now
34-
ShowRaid.any_instance.expects(:by_id).with(10).returns(@raid)
34+
FindRaid.any_instance.expects(:by_id).with(10).returns(@raid)
3535
ListCharacters.any_instance.stubs(:run).returns([])
3636
ListSignups.any_instance.stubs(:for_raid).returns ListSignups::SignupGroups.new
3737
end
@@ -126,7 +126,7 @@ class RaidsControllerTest < ActionController::TestCase
126126
login_as_user
127127

128128
raid = Raid.new
129-
ShowRaid.any_instance.expects(:by_id).with(10).returns(raid)
129+
FindRaid.any_instance.expects(:by_id).with(10).returns(raid)
130130

131131
get :edit, :id => 10
132132

test/unit/interactors/show_raid_test.rb renamed to test/unit/interactors/find_raid_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
require 'unit/test_helper'
2-
require 'interactors/show_raid'
2+
require 'interactors/find_raid'
33

4-
describe ShowRaid do
4+
describe FindRaid do
55

66
it "can find a raid by id" do
77
Repository.for(Raid).save Raid.new(where: "ICC", id: 1)
88

9-
action = ShowRaid.new
9+
action = FindRaid.new
1010

1111
r = action.by_id 1
1212
r.wont_be_nil

0 commit comments

Comments
 (0)