与えられた
context "stripe customer" do
subject { @customer = Stripe::Customer.retrieve @subscription.stripe_customer_token }
it "show me email" do
p @customer.email
p user.email
@customer.email.should == user.email
end
#its(:email) { should == user.email }
its(:description) { should == user.email }
end
ブロックではit
、これはパスします。コメントアウトされた#その部分は通用しません。2 つの異なるオブジェクトを取得します。 expected: "daniel3@example.com"
got: "daniel133@example.com" (using ==)
database_cleaner
これはgemのせいですか?何らかの方法で factory/database_cleaner を適切に設定していませんか?
its ブロックでは一致しないのに、it ブロックでは一致するのはなぜですか? どのように違うのでしょうか?