class Dialog
Attributes
describe[R]
file[RW]
interactions[R]
name[R]
Public Class Methods
new(args)
click to toggle source
# File lib/load_dialogs.rb, line 32 def initialize args args.each do |k,v| instance_variable_set("@#{k}", v) unless v.nil? end end
Public Instance Methods
create_example()
click to toggle source
# File lib/load_dialogs.rb, line 46 def create_example() return if @interactions.size == 0 interactions = @interactions @@lex_chat = lex_chat() ::RSpec.describe "#{@describe} #{@name}" do it @name do while interactions.size > 1 do resp = @@lex_chat.post_message(interactions[0]) expect(resp[:message]).to match(interactions[1]) interactions = interactions.drop(2) end resp = @@lex_chat.post_message(interactions[0]) if interactions.size == 1 end end end
lex_chat()
click to toggle source
# File lib/load_dialogs.rb, line 42 def lex_chat @lex_chat ||= BotSpec::AWS::LexService.new({botname: LoadDialogs.botname}) end