Sha256: 391f78347f3809e47b73326e46c7f52b500164e10e5647b95f896727bc44e097

Contents?: true

Size: 741 Bytes

Versions: 1

Compression:

Stored size: 741 Bytes

Contents

require_relative "./spec_helper"
require "pathname"
require "json"

describe "completions" do

    class TestMockscript
      attr_accessor :json_path, :json, :options, :command, :name, :file, :project

      def initialize
        @json_path = Pathname.new("spec/fixtures/test_gem/test.json").expand_path
        @json = JSON.parse(@json_path.read)
        @options = Rsense::Server::Options.new(@json)
        @command = Rsense::Server::Command::Command.new(@options)
      end

      def code_complete
        @command.code_completion(@options.file, @options.location)
      end
    end

    it "returns completions" do
      @script = TestMockscript.new
      compls = @script.code_complete
      compls.size.must_equal(51)
    end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rsense-server-0.5.2 spec/integration_spec.rb