Skip to content

Instantly share code, notes, and snippets.

@cgrusden
Created October 13, 2015 16:09
Show Gist options
  • Save cgrusden/f447a6bfb51411568b91 to your computer and use it in GitHub Desktop.
Save cgrusden/f447a6bfb51411568b91 to your computer and use it in GitHub Desktop.
module SlackMocks
class Client
end
class User
def initialize(user)
end
class Channel
end
end
module SlackMockHelpers
class UserFactory
def initialize(client)
@client = client
end
def add_user(name, email={})
@client.channels.users << SlackMock::User.new(name: name, opts)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment