yosh1hiro / jpmobile

A Rails plugin for Japanese mobile-phones
http://jpmobile-rails.org
MIT License
0 stars 0 forks source link

[testでのエラー発生] jpmobile-ipaddressesとjpmobile-terminfoのinstallについて #4

Open yosh1hiro opened 9 years ago

yosh1hiro commented 9 years ago

jpmobileをgit cloneし、 bundle installをし、 テストを実行すると下記のエラーが発生します。

% bundle exec rspec                                                                                  (git)-[master]
IP Address test requires jpmobile-ipaddresses module
Terminal display information test requires jpmobile-terminfo module
IP Address test requires jpmobile-ipaddresses module
Terminal display information test requires jpmobile-terminfo module
Run options:
  include {:focus=>true}
  exclude {:broken=>true}

All examples were filtered out; ignoring {:focus=>true}
.............F.FF.....................F.F...********...................................................................................F.FF...F..........................................................................................................................................................................F.................................................................................................FFFFFFFFFFFFFF......................................

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) 絵文字が PC で絵文字を変換するとき Jpmobile::Emoticon.pc_emoticon? がtrueになること
     # emoticon.yaml and emoticons directory don't exists
     # ./spec/rack/jpmobile/emoticon_spec.rb:71

  2) 絵文字が PC で絵文字を変換するとき docomo 絵文字が画像に変換されること
     # emoticon.yaml and emoticons directory don't exists
     # ./spec/rack/jpmobile/emoticon_spec.rb:75

  3) 絵文字が PC で絵文字を変換するとき docomo 絵文字コードが画像に変換されること
     # emoticon.yaml and emoticons directory don't exists
     # ./spec/rack/jpmobile/emoticon_spec.rb:80

  4) 絵文字が PC で絵文字を変換するとき au 絵文字が画像に変換されること
     # emoticon.yaml and emoticons directory don't exists
     # ./spec/rack/jpmobile/emoticon_spec.rb:85

  5) 絵文字が PC で絵文字を変換するとき au 絵文字コードが画像に変換されること
     # emoticon.yaml and emoticons directory don't exists
     # ./spec/rack/jpmobile/emoticon_spec.rb:90

  6) 絵文字が PC で絵文字を変換するとき softbank 絵文字が画像に変換されること
     # emoticon.yaml and emoticons directory don't exists
     # ./spec/rack/jpmobile/emoticon_spec.rb:95

  7) 絵文字が PC で絵文字を変換するとき softbank 絵文字コードが画像に変換されること
     # emoticon.yaml and emoticons directory don't exists
     # ./spec/rack/jpmobile/emoticon_spec.rb:100

  8) 絵文字が PC で絵文字を変換するとき Content-Type が変換できないものである場合には変換しないこと
     # emoticon.yaml and emoticons directory don't exists
     # ./spec/rack/jpmobile/emoticon_spec.rb:105

Failures:

  1) Jpmobile::Rack::MobileCarrier au IPアドレス制限で 正しいIPアドレス空間からのアクセスを判断できること
     Failure/Error: expect(env['rack.jpmobile'].valid_ip?).to be_truthy
       expected: truthy value
            got: false
     # ./spec/rack/jpmobile/au_spec.rb:160:in `block (3 levels) in <top (required)>'

  2) Jpmobile::Rack::MobileCarrier au 画面情報で 端末の画面サイズを正しく取得できること
     Failure/Error: expect(env['rack.jpmobile'].display.width).to  eq(240)
     NameError:
       uninitialized constant Jpmobile::Mobile::Terminfo
     # ./lib/jpmobile/mobile/abstract_mobile.rb:41:in `display'
     # ./spec/rack/jpmobile/au_spec.rb:184:in `block (3 levels) in <top (required)>'

  3) Jpmobile::Rack::MobileCarrier au 画面情報で 端末の画面情報が渡ってない場合に正しく動作すること
     Failure/Error: expect(env['rack.jpmobile'].display.width).to  be_nil
     NameError:
       uninitialized constant Jpmobile::Mobile::Terminfo
     # ./lib/jpmobile/mobile/abstract_mobile.rb:41:in `display'
     # ./spec/rack/jpmobile/au_spec.rb:196:in `block (3 levels) in <top (required)>'

  4) Jpmobile::Rack::MobileCarrier docomo IPアドレス制限で 正しいIPアドレス空間からのアクセスを判断できること
     Failure/Error: expect(env['rack.jpmobile'].valid_ip?).to be_truthy
       expected: truthy value
            got: false
     # ./spec/rack/jpmobile/docomo_spec.rb:208:in `block (3 levels) in <top (required)>'

  5) Jpmobile::Rack::MobileCarrier docomo 端末サイズ SO506iCのサイズを適切に取得できること
     Failure/Error: expect(env['rack.jpmobile'].display.browser_width).to  eq(240)
     NameError:
       uninitialized constant Jpmobile::Mobile::Terminfo
     # ./lib/jpmobile/mobile/abstract_mobile.rb:41:in `display'
     # ./spec/rack/jpmobile/docomo_spec.rb:229:in `block (3 levels) in <top (required)>'

  6) Jpmobile::Rack::MobileCarrier softbank IPアドレス制限で 正しいIPアドレス空間からのアクセスを判断できること
     Failure/Error: expect(env['rack.jpmobile'].valid_ip?).to be_truthy
       expected: truthy value
            got: false
     # ./spec/rack/jpmobile/softbank_spec.rb:76:in `block (3 levels) in <top (required)>'

  7) Jpmobile::Rack::MobileCarrier softbank 画面情報で 端末の画面サイズを正しく取得できること
     Failure/Error: expect(env['rack.jpmobile'].display.width).to           eq(240)
     NameError:
       uninitialized constant Jpmobile::Mobile::Terminfo
     # ./lib/jpmobile/mobile/abstract_mobile.rb:41:in `display'
     # ./spec/rack/jpmobile/softbank_spec.rb:99:in `block (3 levels) in <top (required)>'

  8) Jpmobile::Rack::MobileCarrier softbank 画面情報で 端末の画面情報が渡ってない場合に正しく動作すること
     Failure/Error: expect(env['rack.jpmobile'].display.width).to  be_nil
     NameError:
       uninitialized constant Jpmobile::Mobile::Terminfo
     # ./lib/jpmobile/mobile/abstract_mobile.rb:41:in `display'
     # ./spec/rack/jpmobile/softbank_spec.rb:113:in `block (3 levels) in <top (required)>'

  9) Jpmobile::Rack::MobileCarrier willcom IPアドレス制限で 正しいIPアドレス空間からのアクセスを判断できること
     Failure/Error: expect(env['rack.jpmobile'].valid_ip?).to be_truthy
       expected: truthy value
            got: false
     # ./spec/rack/jpmobile/willcom_spec.rb:54:in `block (3 levels) in <top (required)>'

  10) Jpmobile::Mail delivering delivers through SMTP
      Failure/Error: expect {
        expected no Exception, got #<Errno::ECONNREFUSED: Connection refused - connect(2) for "localhost" port 25> with backtrace:
          # ./vendor/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
          # ./vendor/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:2141:in `do_delivery'
          # ./vendor/bundle/ruby/2.2.0/gems/mail-2.6.3/lib/mail/message.rb:238:in `deliver'
          # ./spec/unit/mail_spec.rb:347:in `block (4 levels) in <top (required)>'
          # ./spec/unit/mail_spec.rb:346:in `block (3 levels) in <top (required)>'
      # ./spec/unit/mail_spec.rb:346:in `block (3 levels) in <top (required)>'

  11) Jpmobile::Mobile::valid_ip? should be return true if 210.153.84.1 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  12) Jpmobile::Mobile::valid_ip? should be return true if 210.153.84.254 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  13) Jpmobile::Mobile::valid_ip? should be return true if 210.230.128.225 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  14) Jpmobile::Mobile::valid_ip? should be return true if 210.230.128.238 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  15) Jpmobile::Mobile::valid_ip? should be return true if 123.108.237.1 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  16) Jpmobile::Mobile::valid_ip? should be return true if 123.108.237.31 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  17) Jpmobile::Mobile::valid_ip? should be return true if 123.108.237.1 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  18) Jpmobile::Mobile::valid_ip? should be return true if 123.108.237.31 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  19) Jpmobile::Mobile::valid_ip? should be return true if 61.198.142.1 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  20) Jpmobile::Mobile::valid_ip? should be return true if 61.198.142.254 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  21) Jpmobile::Mobile::valid_ip? should be return true if 61.198.142.1 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  22) Jpmobile::Mobile::valid_ip? should be return true if 61.198.142.254 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  23) Jpmobile::Mobile::valid_ip? should be return true if 117.55.1.224 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

  24) Jpmobile::Mobile::valid_ip? should be return true if 117.55.1.254 is in carrier address
      Failure/Error: expect(Jpmobile::Mobile.const_get(carrier).valid_ip?(remote_ip)).to eq(true)

        expected: true
             got: false

        (compared using ==)
      # ./spec/unit/valid_ip_spec.rb:21:in `block (3 levels) in <top (required)>'

Finished in 1.99 seconds (files took 0.88327 seconds to load)
463 examples, 24 failures, 8 pending

Failed examples:

rspec ./spec/rack/jpmobile/au_spec.rb:153 # Jpmobile::Rack::MobileCarrier au IPアドレス制限で 正しいIPアドレス空間からのアクセスを判断できること
rspec ./spec/rack/jpmobile/au_spec.rb:175 # Jpmobile::Rack::MobileCarrier au 画面情報で 端末の画面サイズを正しく取得できること
rspec ./spec/rack/jpmobile/au_spec.rb:190 # Jpmobile::Rack::MobileCarrier au 画面情報で 端末の画面情報が渡ってない場合に正しく動作すること
rspec ./spec/rack/jpmobile/docomo_spec.rb:201 # Jpmobile::Rack::MobileCarrier docomo IPアドレス制限で 正しいIPアドレス空間からのアクセスを判断できること
rspec ./spec/rack/jpmobile/docomo_spec.rb:223 # Jpmobile::Rack::MobileCarrier docomo 端末サイズ SO506iCのサイズを適切に取得できること
rspec ./spec/rack/jpmobile/softbank_spec.rb:69 # Jpmobile::Rack::MobileCarrier softbank IPアドレス制限で 正しいIPアドレス空間からのアクセスを判断できること
rspec ./spec/rack/jpmobile/softbank_spec.rb:91 # Jpmobile::Rack::MobileCarrier softbank 画面情報で 端末の画面サイズを正しく取得できること
rspec ./spec/rack/jpmobile/softbank_spec.rb:107 # Jpmobile::Rack::MobileCarrier softbank 画面情報で 端末の画面情報が渡ってない場合に正しく動作すること
rspec ./spec/rack/jpmobile/willcom_spec.rb:47 # Jpmobile::Rack::MobileCarrier willcom IPアドレス制限で 正しいIPアドレス空間からのアクセスを判断できること
rspec ./spec/unit/mail_spec.rb:344 # Jpmobile::Mail delivering delivers through SMTP
rspec ./spec/unit/valid_ip_spec.rb[1:1] # Jpmobile::Mobile::valid_ip? should be return true if 210.153.84.1 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:2] # Jpmobile::Mobile::valid_ip? should be return true if 210.153.84.254 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:3] # Jpmobile::Mobile::valid_ip? should be return true if 210.230.128.225 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:4] # Jpmobile::Mobile::valid_ip? should be return true if 210.230.128.238 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:5] # Jpmobile::Mobile::valid_ip? should be return true if 123.108.237.1 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:6] # Jpmobile::Mobile::valid_ip? should be return true if 123.108.237.31 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:7] # Jpmobile::Mobile::valid_ip? should be return true if 123.108.237.1 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:8] # Jpmobile::Mobile::valid_ip? should be return true if 123.108.237.31 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:9] # Jpmobile::Mobile::valid_ip? should be return true if 61.198.142.1 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:10] # Jpmobile::Mobile::valid_ip? should be return true if 61.198.142.254 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:11] # Jpmobile::Mobile::valid_ip? should be return true if 61.198.142.1 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:12] # Jpmobile::Mobile::valid_ip? should be return true if 61.198.142.254 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:13] # Jpmobile::Mobile::valid_ip? should be return true if 117.55.1.224 is in carrier address
rspec ./spec/unit/valid_ip_spec.rb[1:14] # Jpmobile::Mobile::valid_ip? should be return true if 117.55.1.254 is in carrier address

上記のエラーはjpmobile-ipaddressesjpmobile-terminfoがインストールされていないためです。

yosh1hiro commented 9 years ago

解決方法としては大きく2つあり、