Sha256: 204a41afe11f2aad099f8e950738e87e0163e06bcf687c36223400380987d259

Contents?: true

Size: 1.11 KB

Versions: 69

Compression:

Stored size: 1.11 KB

Contents

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

# rubocop:disable EmptyLines, LineLength

describe RubyToBlock::Block::MotionTurn, to_blocks: true do
  _parts = <<-EOS
turn
  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="motion_turn" />
      XML
    end
  end

  _parts = <<-EOS
car1.turn
  EOS
  describe compact_source_code(_parts), character_new_data: true do
    __parts = _parts
    let(:parts) { __parts }

    it '結果が正しいこと' do
      should eq_block_xml(<<-XML)
    <field name="NAME">car1</field>
    <statement name="DO">
      <block type="motion_turn" />
    </statement>
      XML
    end
  end

  _parts = <<-EOS
turn
  EOS
  describe compact_source_code(_parts) do
    __parts = _parts
    let(:data) { __parts }

    it '結果が正しいこと' do
      should eq_block_xml(<<-XML)
  <block type="ruby_statement">
    <field name="STATEMENT">turn</field>
  </block>
      XML
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

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