Sha256: d73c85b96cd84804c81fe7b7a537bb1eb68b5f4fe4bc3e12c9c7eeceec62334c

Contents?: true

Size: 1.36 KB

Versions: 27

Compression:

Stored size: 1.36 KB

Contents

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

# rubocop:disable EmptyLines, LineLength

describe RubyToBlock::Block::MotionReachWall, to_blocks: true do
  parts = <<-EOS
if reach_wall?

end
  EOS
  describe compact_source_code(parts), on_start_data: true do
    _parts = parts
    let(:parts) { _parts }

    it '結果が正しいこと' do
      should eq_block_xml(<<-XML)
          <block type="control_if" inline="true">
            <value name="COND">
              <block type="motion_reach_wall" />
            </value>
          </block>
      XML
    end
  end

  parts = <<-EOS
if car1.reach_wall?

end
  EOS
  describe compact_source_code(parts), character_new_data: true do
    _parts = parts
    let(:parts) { _parts }

    it '結果が正しいこと' do
      should eq_block_xml(<<-XML)
      <block type="ruby_expression">
        <field name="EXP">car1.reach_wall?</field>
      </block>
      XML
    end
  end

  parts = <<-EOS
if reach_wall?

end
  EOS
  describe compact_source_code(parts) do
    _parts = parts
    let(:data) { _parts }

    it '結果が正しいこと' do
      should eq_block_xml(<<-XML)
  <block type="control_if" inline="true">
    <value name="COND">
      <block type="ruby_expression">
        <field name="EXP">reach_wall?</field>
      </block>
    </value>
  </block>
      XML
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
smalruby-editor-0.1.20-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.20 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.19-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.19 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.18-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.18 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.17-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.17 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.16-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.16 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.15-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.15 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.14-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.14 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.13-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.13 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.12-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.12 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.11-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb
smalruby-editor-0.1.10-x86-mingw32 spec/models/concerns/ruby_to_block/block/motion_reach_wall_spec.rb