Sha256: 7ba926d9449d65a4fad463821802c93d1138dbbd8f5a147ea508b8e94eb2e3a3

Contents?: true

Size: 715 Bytes

Versions: 1

Compression:

Stored size: 715 Bytes

Contents

require 'minitest/autorun'
require 'minitest/pride'

require_relative '../src/<%= bot_name %>.rb'

class Test<%= class_name %> <  MiniTest::Test

  def test_generate_returns_hello_world
    assert_match /Hello/, <%= class_name %>.generate
  end

  def test_generate_returns_less_than_140
    refute [*0...1000].map { |_| <%= class_name %>.generate }.any?{ |t| t.length > 140 }
  end

  def test_hides_greetings
    refute_respond_to <%= class_name %>, :greetings
    assert_instance_of String, <%= class_name %>.send(:greetings)[0]
  end

  def test_hides_io_metal
    refute_respond_to <%= class_name %>, :load_txt_file
    assert_equal 3, <%= class_name %>.send(:load_txt_file, 'greetings.txt').length
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twitter_bot_generator-0.2.2 lib/twitter_bot_generator/templates/test/test_bot_test.rb.erb