Sha256: ba5f487e9835692d1a9b29633a71e6af82c8f53f3ba82260f5903132c8779bfc

Contents?: true

Size: 484 Bytes

Versions: 24

Compression:

Stored size: 484 Bytes

Contents

HERE = File.dirname(__FILE__)
require File.join(HERE, 'helper')

class TestGmanFilter < Minitest::Test

  txt_path = File.join(HERE, "obama.txt")
  exec_path = File.join(HERE, "..", "bin", "gman_filter")

  should "remove non-gov/mil addresses" do
    filtered = `#{exec_path} < #{txt_path}`
    expected = %w(
      mr.senator@obama.senate.gov
      president@whitehouse.gov
      commander.in.chief@us.army.mil
    ).join("\n") + "\n"
    assert_equal filtered, expected
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
gman-5.0.9 test/test_gman_filter.rb
gman-5.0.8 test/test_gman_filter.rb
gman-5.0.7 test/test_gman_filter.rb
gman-5.0.6 test/test_gman_filter.rb
gman-5.0.5 test/test_gman_filter.rb
gman-5.0.4 test/test_gman_filter.rb
gman-5.0.3 test/test_gman_filter.rb
gman-5.0.2 test/test_gman_filter.rb
gman-5.0.1 test/test_gman_filter.rb
gman-5.0.0 test/test_gman_filter.rb
gman-4.7.1 test/test_gman_filter.rb
gman-4.7.0 test/test_gman_filter.rb
gman-4.6.5 test/test_gman_filter.rb
gman-4.6.4 test/test_gman_filter.rb
gman-4.6.3 test/test_gman_filter.rb
gman-4.6.2 test/test_gman_filter.rb
gman-4.6.1 test/test_gman_filter.rb
gman-4.6.0 test/test_gman_filter.rb
gman-4.5.1 test/test_gman_filter.rb
gman-4.5.0 test/test_gman_filter.rb