Sha256: 8d5ca1fb7ad421aad516d1470e53e97f03e02b6b235ba66bbe4f9dea666fff36

Contents?: true

Size: 741 Bytes

Versions: 8

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(66)
    end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rsense-server-0.5.18 spec/integration_spec.rb
rsense-server-0.5.17 spec/integration_spec.rb
rsense-server-0.5.16 spec/integration_spec.rb
rsense-server-0.5.15 spec/integration_spec.rb
rsense-server-0.5.14 spec/integration_spec.rb
rsense-server-0.5.13 spec/integration_spec.rb
rsense-server-0.5.12 spec/integration_spec.rb
rsense-server-0.5.11 spec/integration_spec.rb