Skip to content

Instantly share code, notes, and snippets.

@haru01
Created May 16, 2012 01:25
Show Gist options
  • Select an option

  • Save haru01/2706556 to your computer and use it in GitHub Desktop.

Select an option

Save haru01/2706556 to your computer and use it in GitHub Desktop.
windows rspec tdd 環境構築
# 環境構築メモ
## rspec install
gem install rspec
## ansicon
https://github.com/adoxa/ansicon/downloads
解答して、x86\ansicon.exeを起動して テスト実行で カラーリング
## DevKid
http://github.com/oneclick/rubyinstaller/wiki/Development-Kit ダウンロード
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
にしたがってインストール
cd <DevKit>
ruby dk.rb init
※) DevKit\config.yml で Ruby インストールフォルダーを手動で設定必要な場合もあり
ruby dk.rb install
## guard
gem install guard
gem install guard-rspec
cd c:\tdd\bowling
guard init
### Guardfile を修正
c:\tdd\Guardfile を修正
guard 'rspec', :version => 2, :cli => "-c -fs" do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
end
### フォルダーの前提
c:\tdd\bowling\spec\lib\bowling_spec.rb
c:\tdd\bowling\lib\bowling.rb
c:\tdd\bowling\Guardfile
### guard の実行
cd c:\tdd\bowling
guard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment