2012-02-01から1日間の記事一覧

File to import not found or unreadable: compass. in Rails 3.2.1

@import "compass" Rails 3.2.1, compass 0.11.7 で compass を import しようとするとエラーになるので、Gemfile を以下のように書き換えると動く。 gem 'compass', :git => 'git://github.com/chriseppstein/compass.git', :branch => 'no_rails_integrati…

PHP で時刻に関わるテストをする

時刻に関わるテストの大体は面倒くさい。 次の金曜日のUNIXTIMEを返す関数が来週も正しく動作することをテストしたい場合、以下のようにサーバ時刻を変更し、完了後に元に戻すことでテストができる。