Giter VIP home page Giter VIP logo

keiba_expectation_app's People

Contributors

mterada1228 avatar

Watchers

 avatar

keiba_expectation_app's Issues

docker container 内で RSpec を実行すると Capybara の save_and_open_page メソッドが失敗する

発生するエラー

     Failure/Error: save_and_open_page
     
     Launchy::CommandNotFoundError:
       Unable to find a browser command. If this is unexpected, Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at https://github.com/copiousfreetime/launchy/issues/new
     # /usr/local/bundle/ruby/2.5.0/gems/launchy-2.4.3/lib/launchy/applications/browser.rb:63:in `browser_cmdline'
     # /usr/local/bundle/ruby/2.5.0/gems/launchy-2.4.3/lib/launchy/applications/browser.rb:67:in `cmd_and_args'
     # /usr/local/bundle/ruby/2.5.0/gems/launchy-2.4.3/lib/launchy/applications/browser.rb:78:in `open'
     # /usr/local/bundle/ruby/2.5.0/gems/launchy-2.4.3/lib/launchy.rb:29:in `open'
     # /usr/local/bundle/ruby/2.5.0/gems/capybara-2.18.0/lib/capybara/session.rb:890:in `open_file'
     # /usr/local/bundle/ruby/2.5.0/gems/capybara-2.18.0/lib/capybara/session.rb:761:in `save_and_open_page'
     # /usr/local/bundle/ruby/2.5.0/gems/capybara-2.18.0/lib/capybara/dsl.rb:50:in `block (2 levels) in <module:DSL>'
     # ./spec/features/comments_spec.rb:27:in `block (3 levels) in <top (required)>'

スクレイピングクラスでやってるのは以下の3つだと思います。

スクレイピングクラスでやってるのは以下の3つだと思います。

  • データをスクレープして、ハッシュとして情報をまとめる
  • そのデータを使って、レコードを作成する
  • 必要に応じて他のクラスを呼び出す

ただし、それだと、単一責任の原則が守られず、保守性が下がるので、用途別でクラスを分けたほうがいいと思います。そうすれば、テストもしやすくなります。

Originally posted by @ershn in #12 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.