Sha256: 0cc36f3ad3d6f0b2b0ad5a7003c0b0efdcd302c8cf3dbdfbe5d468a92b90d0e7

Contents?: true

Size: 451 Bytes

Versions: 7

Compression:

Stored size: 451 Bytes

Contents

require 'spec_helper'

describe Analyst::Entities::String do

  let(:code) {<<-CODE
      class DefaultCarrier
        def initialize
          "USPS"
        end
      end
    CODE
  }
  let(:parser) { Analyst.for_source(code) }
  let(:klass)  { parser.classes.first }
  let(:string) { klass.imethods.first.strings.first }

  describe "#value" do
    it "returns the value of the string" do
      expect(string.value).to eq("USPS")
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
analyst-1.2.4 spec/entities/string_spec.rb
analyst-1.2.3 spec/entities/string_spec.rb
analyst-1.2.2 spec/entities/string_spec.rb
analyst-1.2.1 spec/entities/string_spec.rb
analyst-1.2.0 spec/entities/string_spec.rb
analyst-1.0.1 spec/entities/string_spec.rb
analyst-1.0.0 spec/entities/string_spec.rb