Module: Toolchest::RSpec::Helpers

Defined in:
lib/toolchest/rspec.rb

Instance Method Summary collapse

Instance Method Details

#call_tool(tool_name, params: {}, as: nil) ⇒ Object



22
23
24
25
26
27
# File 'lib/toolchest/rspec.rb', line 22

def call_tool(tool_name, params: {}, as: nil)
  Toolchest::Current.set(auth: as) do
    raw = Toolchest.router.dispatch(tool_name, params)
    @_tool_response = ToolResponse.new(raw)
  end
end

#tool_responseObject



29
# File 'lib/toolchest/rspec.rb', line 29

def tool_response = @_tool_response