Whether I type "rspec" or "rake spec" in the terminal, it just hangs and never finishes the testing suite. I've commented out tests, ran test files individually, but it still just stops. Closest I got to having it finish was uninstalling and reinstalling rspec-rails. First time I run it, I get it to finish. Second time, I get this: $ rake spec /Users/edmac/.rvm/rubies/ruby-2.1.3/bin/ruby -I/Users/
はじめに:Springが起動するコマンドはいったいどれだ!? Rails 4.1からはアプリケーションpreloaderとしてSpringが標準で組みこまれています。 Springを使うとバックグラウンドでRailsサーバーが動いている状態になるので、rails g やrakeコマンドが素早く起動します。 一般に、Springを使う場合は bin/rails g や bin/rake -T のように、bin/ を付けるように言われていますが、これは必須なんでしょうか? bin/ を付けずに実行すると、何が起きるんでしょうか? というわけでちょっと調べてみました。 対象バージョン Rails 4.1または4.2 railsコマンドの場合:bin/ を付けなくても大丈夫! まず最初に、bin/rails c と rails c を実行して、Springのstatusがどう変わるか確認してみまし
Springとは Springとは、Rails4.1から標準で付属するようになったアプリケーションプリローダーです。 Rails内では様々なライブラリのロードなどの前処理が行われるので、コマンドを実行するための待ち時間がかかってしまいます。 事前にバックグラウンドでライブラリをロードしておくことで、その待ち時間を短くするものがアプリケーションプリローダーです。 MiniTestやRSpecをrakeコマンドで実行したり、サーバー起動やconsoleをrailsコマンドで実行すると思いますが、動き出すまで数秒かかると思います。 開発を通すとこういったコマンドは、何十回、何百回も実行することになるので、数秒でも早いにこしたことはありません。 他の有名なアプリケーションプリローダーには、SporkやZeusといったものもあります。 Spring導入前 Springを使わないでテストを実行してみま
2 October 2013 6 Ways to Remove Pain From Feature Testing in Ruby on Rails Lire cet article en français. Writing feature tests in Ruby on Rails used to be the most painful part of my development work flow. Now I kind of like it. Here’s what’s different: 1. Don’t Use Cucumber Disclaimer: The views expressed in the following paragraph do not necessarily represent those of the Staff or Partners of Ga
コーヒーと本と甘いもの Rails, AngularJS, iOS, デザイン, CI, スタートアップ, 登山, バスケなどに興味があります。 環境構築方法 Gemfileに対象Gemパッケージ名を追記 Gemfile group :test do gem 'rspec-rails' gem 'capybara' gem 'factory_girl_rails' end group :development do gem 'spring' gem 'spring-commands-rspec' end Gemパッケージをインストール bundle install rspecの設定 bundle binstubs rspec-core rails g rspec:install rm -rf test #必要なディレクトリを作成 mkdir -p spec/factories mkdir
Highlights in Rails 4.1: Spring application preloader config/secrets.yml Action Pack variants Action Mailer previews These release notes cover only the major changes. To learn about various bug fixes and changes, please refer to the changelogs or check out the list of commits in the main Rails repository on GitHub. 1. Upgrading to Rails 4.1If you're upgrading an existing application, it's a great
spring は最近流行ってるので、既に知ってる方もいると思いますが Rails のプリローダーです。 Rails を使ってる人だったら bundle exec rails console とか bundle exec rails generate model user とか bundle exec rake routes とか、便利コマンドにお世話になることも多いと思います。 でも Rails ってとても巨大なフレームワークなので、コマンド一つ起動するにも Rails の資産が全部ロードされて結構な時間がかかります。なので Rails をあらかじめバックグラウンドで起動しておくことによって、コマンドの起動時間を大幅に短縮してくれるのが spring です。 前は Gemfile には書かずにシステムに gem コマンドでインストールして spring rake routes とかやってて
Rails 4.1 allows us to use Spring to run our rails and rake commands quickly by running your application in the background and avoiding the rails startup time penalty. It took me a little while to find this information, so here is my guide to setting this up. I’m using the Rspec testing framework with the Guard event watcher as the test runner. Spring allows us to watch the test run almost immedia
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く