require 'spec_helper' describe PdftkForms::Fdf do context "multiple fields" do before do @fdf = PdftkForms::Fdf.new :field1 => 'fieldvalue1', :other_field => 'some other value' @fdf_text = @fdf.to_fdf end it { @fdf_text.should_not be_nil } it { @fdf_text.should match(%r{<>}) } it { @fdf_text.should match(%r{<>}) } end context "quoting fields" do before do @fdf = PdftkForms::Fdf.new :field1 => 'field(va)lue1' @fdf_text = @fdf.to_fdf end it { @fdf_text.should_not be_nil } it { @fdf_text.should match(%r{<>}) } end context "multi-value fields" do before do @fdf = PdftkForms::Fdf.new :field1 => %w(one two) @fdf_text = @fdf.to_fdf end it { @fdf_text.should_not be_nil } it { @fdf_text.should match(%r{<>}) } end end