Sha256: ae7fdfa6eeed478e0b149a7a42dc33bdf52772e2b35ef9b4afbf4ec15b2d54d2

Contents?: true

Size: 767 Bytes

Versions: 4

Compression:

Stored size: 767 Bytes

Contents

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

describe Rsense::Server::Options do
  before do
    @json_path = Pathname.new("spec/fixtures/sample.json")
    @json = JSON.parse(@json_path.read)
    @options = Rsense::Server::Options.new(@json)
  end

  it "has a command" do
    @options.command.must_match(/code_completion/)
  end

  it "has a project path" do
    @options.project_path.to_s.must_match(/lib\/rsense/)
    @options.project_path.class.must_equal(Pathname)
  end

  it "has code" do
    @options.code.must_match(/def/)
  end

  it "has a location" do
    @options.location["row"].must_equal(2)
    @options.location["column"].must_equal(10)
  end

  it "has a file" do
    @options.file.to_s.must_match(/server\.rb/)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rsense-server-0.5.18 spec/rsense/server/options_spec.rb
rsense-server-0.5.17 spec/rsense/server/options_spec.rb
rsense-server-0.5.16 spec/rsense/server/options_spec.rb
rsense-server-0.5.15 spec/rsense/server/options_spec.rb