使用eq和eql在rspec测试中有什么区别?是否有区别:
it "adds the correct information to entries" do
# book = AddressBook.new # => Replaced by line 4
book.add_entry('Ada Lovelace', '010.012.1815', 'augusta.king@lovelace.com')
new_entry = book.entries[0]
expect(new_entry.name).to eq('Ada Lovelace')
expect(new_entry.phone_number).to eq('010.012.1815')
expect(new_entry.email).to eq('augusta.king@lovelace.com')
end
Run Code Online (Sandbox Code Playgroud)
和:
it "adds the correct information to entries" do
# book = AddressBook.new # => Replaced by line 4
book.add_entry('Ada Lovelace', '010.012.1815', 'augusta.king@lovelace.com')
new_entry = book.entries[0]
expect(new_entry.name).to eql('Ada Lovelace')
expect(new_entry.phone_number).to eql('010.012.1815')
expect(new_entry.email).to eql('augusta.king@lovelace.com')
end
Run Code Online (Sandbox Code Playgroud) 我有一个woocommerce的问题,我的商店页面取得了第一个产品的标题,并将其用作商店标题......我想我可以通过设置商店的基页来解决这个问题,但我找不到在WooCommerce设置中执行此操作的设置.正如您所看到的,商店基页未在后端设置,但我看不到设置它的选项.
我也搜索过,似乎在我的问题上找不到多少.这是我指的商店:http://museumofbuford.com/shop/