0
執行我有一個測試,看起來像這樣:之前:各不共享例如
describe "test" do
shared_example "a thing" do
before :each do
puts 'in before'
end
describe 'the thing' do
puts 'in test'
end
end
it_behaves_like "a thing"
end
當運行該代碼時,輸出爲in test
。爲什麼?