# -*- coding: utf-8 -*- require 'spec_helper' require_relative 'shared/block_examples' # rubocop:disable EmptyLines, LineLength describe RubyToBlock::Block, 'NeoPixel blocks', to_blocks: true do parts = <<-EOS require "smalruby" init_hardware car1 = Character.new(costume: "car1.png", x: 0, y: 0, angle: 0) car1.on(:start) do neo_pixel("D5").set(color: [0, 128, 255]) end car1.neo_pixel("D5").set(color: [0, 128, 255]) EOS describe compact_source_code(parts) do _parts = parts let(:data) { _parts } it '結果が正しいこと' do should eq_block_xml(<<-XML) car1 D5 0 128 255 D5 0 128 255 XML end end end