Sha256: d798c4c54b3754b425a74661028594e0493229b343774e6b06bfb70257d6e03e

Contents?: true

Size: 521 Bytes

Versions: 36

Compression:

Stored size: 521 Bytes

Contents

require "spec_helper"

describe Liquidscript::Scanner do
  subject { described_class::Liquidscript.new("42") }
  it { should be_a Enumerable }

  describe "#each" do
    specify { expect(subject.each).to be_a Enumerator }
    specify { expect { |y| subject.each(&y) }.to yield_control.once }
  end

  context "with invalid input" do
    subject { described_class::Liquidscript.new("';") }

    it "raises an error" do
      expect {
        subject.each
      }.to raise_error Liquidscript::SyntaxError
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
liquidscript-0.11.0 spec/liquidscript/scanner_spec.rb
liquidscript-0.11.0.rc1 spec/liquidscript/scanner_spec.rb
liquidscript-0.10.4 spec/liquidscript/scanner_spec.rb
liquidscript-0.10.3 spec/liquidscript/scanner_spec.rb
liquidscript-0.10.2 spec/liquidscript/scanner_spec.rb
liquidscript-0.10.1 spec/liquidscript/scanner_spec.rb
liquidscript-0.10.0 spec/liquidscript/scanner_spec.rb
liquidscript-0.9.2 spec/liquidscript/scanner_spec.rb
liquidscript-0.9.1 spec/liquidscript/scanner_spec.rb
liquidscript-0.9.0 spec/liquidscript/scanner_spec.rb
liquidscript-0.8.2 spec/liquidscript/scanner_spec.rb
liquidscript-0.8.1 spec/liquidscript/scanner_spec.rb
liquidscript-0.8.0 spec/liquidscript/scanner_spec.rb
liquidscript-0.7.12 spec/liquidscript/scanner_spec.rb
liquidscript-0.7.11 spec/liquidscript/scanner_spec.rb
liquidscript-0.7.10 spec/liquidscript/scanner_spec.rb
liquidscript-0.7.9 spec/liquidscript/scanner_spec.rb
liquidscript-0.7.8 spec/liquidscript/scanner_spec.rb
liquidscript-0.7.7 spec/liquidscript/scanner_spec.rb
liquidscript-0.7.6 spec/liquidscript/scanner_spec.rb