Sha256: 6c4070209fb1cbc7cbd7bf859682b8271ebac8eee5da03196a42ff406cb6daea

Contents?: true

Size: 848 Bytes

Versions: 42

Compression:

Stored size: 848 Bytes

Contents

# -*- coding: utf-8 -*-
require 'spec_helper'
require_relative 'shared/block_examples'

# rubocop:disable EmptyLines, LineLength

describe RubyToBlock::Block::Text, to_blocks: true do
  parts = <<-EOS
require "smalruby"

p("こんにちは")
p("\\"\\"")
  EOS
  describe compact_source_code(parts) do
    _parts = parts
    let(:data) { _parts }

    it '結果が正しいこと' do
      should eq_block_xml(<<-XML)
  <block type="ruby_p" inline="true">
    <value name="ARG">
      <block type="text">
        <field name="TEXT">こんにちは</field>
      </block>
    </value>
    <next>
      <block type="ruby_p" inline="true">
        <value name="ARG">
          <block type="text">
            <field name="TEXT">&quot;&quot;</field>
          </block>
        </value>
      </block>
    </next>
  </block>
      XML
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
smalruby-editor-0.4.1-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.4.2-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.4.2 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.4.1 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.4.0-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.4.0 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.5-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.5 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.4-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.4 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.3-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.3 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.2-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.2 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.1-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.1 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.0-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.3.0 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.2.7-x86-mingw32 spec/models/concerns/ruby_to_block/block/text_spec.rb
smalruby-editor-0.2.7 spec/models/concerns/ruby_to_block/block/text_spec.rb