Sha256: dfa05cb5a6baef5186a954731bd32b4d6851d66ad82e67afdaf6678bff31cd13

Contents?: true

Size: 560 Bytes

Versions: 3

Compression:

Stored size: 560 Bytes

Contents

require 'spec_helper'
require 'ostruct'

describe Languages::Zpl2::Document do
  let(:document_output)  { subject.render.strip }
  it "starts with ^XA" do
    expect(document_output).to start_with("^XA")
  end

  it "concat strings" do
    subject << "hello_world"
    expect(document_output).to include("hello_world")
  end

  it "calls render on objects" do
    subject << OpenStruct.new(:render => 'hello_world')
    expect(document_output).to include("hello_world")
  end
  
  it "ends with ^XZ" do
    expect(document_output).to end_with("^XZ")
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
zebra_printer-0.9.0 spec/lib/languages/zpl2/document_spec.rb
zebra_printer-0.8.0 spec/lib/languages/zpl2/document_spec.rb
zebra_printer-0.1.1 spec/lib/languages/zpl2/document_spec.rb