Skip to content

Instantly share code, notes, and snippets.

@fukajun
Created December 6, 2012 06:48
Show Gist options
  • Save fukajun/4222284 to your computer and use it in GitHub Desktop.
Save fukajun/4222284 to your computer and use it in GitHub Desktop.
Letの効果的な使い方
describe "hoge" do
bofore do
get "index" , value
end
context "範囲内に収まるパラメータがくる" do
let (:value) { 123 }
it { response.should eq true }
end
context "範囲内に収まっていないパラメータがくる" do
let (:value) { 123456 }
it { response.should eq false }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment