Skip to content
Permalink
Browse files

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.
  • Loading branch information
jasonroelofs committed Jul 13, 2012
1 parent 92c4fb5 commit be40902a762dfa035e859a7ab75b0eb3f80aa74f
@@ -47,7 +47,7 @@ def update
protected

def find_raid(id)
ShowRaid.new.by_id id.to_i
FindRaid.new.by_id id.to_i
end

def schedule_raid(raid = nil)
@@ -4,7 +4,7 @@
##
# NOTE: Is this too simple for an Interactor?
##
class ShowRaid
class FindRaid

def by_id(id)
Repository.for(Raid).find(id)
@@ -31,7 +31,7 @@ class RaidsControllerTest < ActionController::TestCase
login_as_user

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

raid = Raid.new
ShowRaid.any_instance.expects(:by_id).with(10).returns(raid)
FindRaid.any_instance.expects(:by_id).with(10).returns(raid)

get :edit, :id => 10

@@ -1,12 +1,12 @@
require 'unit/test_helper'
require 'interactors/show_raid'
require 'interactors/find_raid'

describe ShowRaid do
describe FindRaid do

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

action = ShowRaid.new
action = FindRaid.new

r = action.by_id 1
r.wont_be_nil

0 comments on commit be40902

Please sign in to comment.
You can’t perform that action at this time.