Sha256: 502845f205bf0c45191d52b7bcc30e62fad0667eab57ffb3e380e84fd6150d32

Contents?: true

Size: 1.1 KB

Versions: 69

Compression:

Stored size: 1.1 KB

Contents

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

# rubocop:disable EmptyLines, LineLength

describe RubyToBlock::Block::RubyComment, to_blocks: true do
  _data = <<-EOS
# 逃げる車
  EOS
  describe compact_source_code(_data) do
    __data = _data
    let(:data) { __data }

    it '結果が正しいこと' do
      should eq_block_xml(<<-XML)
  <block type="ruby_comment">
    <field name="COMMENT">逃げる車</field>
  </block>
      XML
    end
  end

  _data = <<-EOS
#   逃げる車
  EOS
  describe compact_source_code(_data) do
    __data = _data
    let(:data) { __data }

    it '結果が正しいこと' do
      should eq_block_xml(<<-XML)
  <block type="ruby_comment">
    <field name="COMMENT">  逃げる車</field>
  </block>
      XML
    end
  end

  _data = <<-EOS
#逃げる車
  EOS
  describe compact_source_code(_data) do
    __data = _data
    let(:data) { __data }

    it '結果が正しいこと' do
      should eq_block_xml(<<-XML)
  <block type="ruby_statement">
    <field name="STATEMENT">#逃げる車</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/ruby_comment_spec.rb
smalruby-editor-0.4.2-x86-mingw32 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.4.2 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.4.1 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.4.0-x86-mingw32 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.4.0 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.5-x86-mingw32 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.5 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.4-x86-mingw32 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.4 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.3-x86-mingw32 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.3 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.2-x86-mingw32 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.2 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.1-x86-mingw32 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.1 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.0-x86-mingw32 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.3.0 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.2.7-x86-mingw32 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb
smalruby-editor-0.2.7 spec/models/concerns/ruby_to_block/block/ruby_comment_spec.rb