ハイパーニートプログラマーへの道

頑張ったり頑張らなかったり

Rspec

【RSpec】 Capybara + poltergeist にて rspec failed to detect theversion of the executable at '/usr/bin/phantomjs'

Ubuntu16.04上に構築しているRailsにてfeature spec (capybara + poltergeist) を走らせたときに rspec failed to detect theversion of the executable at '/usr/bin/phantomjs' とかなんとかエラーでこける。 ちょっと古いですがこちらを見ると stackoverf…

TechDRILL - Rspec入門編ーテストコードを書いてみよう!ーをやってみたんだが

やってみました。いろいろケチつけていきますと・・・。 http://tech-drill.in/questions/12 「ファイル構成」の部分で spec/hello/spec.rbとなっていますが正しくはspec/hello_spec.rbなのでは。 「準備が出来たか確認する」の部分で spec_helper.rbの完成…

【Rspec】Warning: you should require 'minitest/autorun' instead. (略 とか出てきたので

Rails 4.2.0 Ruby 2.1.4p265 Rspec 3.2.3 Rspec及びguardを使っていたら、警告が Warning: you should require 'minitest/autorun' instead. Warning: or add 'gem "minitest"' before 'require "minitest/autorun"' RSpecでテストする際に、「Warning: you …

shoulda-matchers 2.8.0で undefined method `validate_presence_of'などと出たので。

Rails 4.2.0 Rspec 3.2.2 shoulda-matchers 2.8.0 it { should validate_presence_of(:hoge) } it { should validate_uniqueness_of(:hage) } とかでundefined methodだと怒られました。調べてみると・・・ undefined method `validate_presence_of' in shou…