Sha256: b6e5bdb5b8a12ded973ebc216ee548b8929d96eb9d125ff1d9174d2f69e7fb53
Contents?: true
Size: 642 Bytes
Versions: 11
Compression:
Stored size: 642 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Rubocop::Token do describe '.from_parser_token' do subject(:token) { described_class.from_parser_token(parser_token) } let(:parser_token) { [type, [text, range]] } let(:type) { :kDEF } let(:text) { 'def' } let(:range) { double('range') } it "sets parser token's type to rubocop token's type" do expect(token.type).to eq(type) end it "sets parser token's text to rubocop token's text" do expect(token.text).to eq(text) end it "sets parser token's range to rubocop token's pos" do expect(token.pos).to eq(range) end end end
Version data entries
11 entries across 11 versions & 2 rubygems