Sha256: 9626c60916baf790d86348e63e217dcff858866929680ecf73ec7af7c23dd01d
Contents?: true
Size: 785 Bytes
Versions: 35
Compression:
Stored size: 785 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' module Quby::Questionnaires::Entities describe Text do before(:all) do @some_string = "I'm a string" @markdown_result = "<p>I’m a string</p>" end it "should be creatable from a string" do expect { Quby::Questionnaires::Entities::Text.new(@some_string) }.to_not raise_error end describe "#to_s" do it "should return the string the Text was initialized with" do text = Quby::Questionnaires::Entities::Text.new(@some_string) expect(text.to_s).to eq @markdown_result end end it "should be valid for any hash" do text = Quby::Questionnaires::Entities::Text.new(@some_string) expect(text.validate_answer({})).to be_truthy end end end
Version data entries
35 entries across 35 versions & 1 rubygems