这通过:
describe "log page" do
#let(:user) { FactoryGirl.create(:user) }
#let!(:m1) { FactoryGirl.create(:status_update, user: user ) }
#let!(:m2) { FactoryGirl.create(:status_update, user: user ) }
before { visit user_path(user) }
#it { should have_selector('h1', text: user.email) }
#it { should have_selector('title', text: user.email) }
#describe "logs" do
# it { should have_content(m1.weight) }
# it { should have_content(m2.weight) }
# it { should have_content(user.status_updates.count) }
#end
end
当我取消注释其他所有内容时,它会失败。
为什么会这样?!我一直在拔头发试图弄清楚。