Sha256: cd39358633d8c17591e5f75c86672c56d2d0217a6a93b013165678ec802d35e2

Contents?: true

Size: 741 Bytes

Versions: 7

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

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rsense-server-0.5.10 spec/integration_spec.rb
rsense-server-0.5.9 spec/integration_spec.rb
rsense-server-0.5.8 spec/integration_spec.rb
rsense-server-0.5.7 spec/integration_spec.rb
rsense-server-0.5.6 spec/integration_spec.rb
rsense-server-0.5.5 spec/integration_spec.rb
rsense-server-0.5.4 spec/integration_spec.rb