Sha256: 8784e8c34c97a4ed762e955e535703e680b344571698da2bd3242e8fc5ead5ab
Contents?: true
Size: 836 Bytes
Versions: 27
Compression:
Stored size: 836 Bytes
Contents
require "bot/rspec/syntax.rb" require "bot/rspec/matchers.rb" require "bot/rspec/fixnum_helper.rb" module Bot module Rspec include Syntax include Matchers Fixnum.send(:include, FixnumHelper) def self.included(base) if base.metadata[:type] == :responder base.let(:username) { "user" } unless base.respond_to? :username base.let(:user) { create(:user) } unless base.respond_to? :user base.let(:message) { incoming_message(user.username) } unless base.respond_to? :message base.let(:handler) { class_double("Handler") } unless base.respond_to? :handler base.let(:responses) { [] } unless base.respond_to? :responses base.let(:responder) { base.described_class.new(message, user, responses, handler) } unless base.respond_to? :responder end end end end
Version data entries
27 entries across 27 versions & 1 rubygems