我在爲獲得檔案 def self.archives
Post.unscoped.select("YEAR(created_at) AS year, MONTHNAME(created_at) AS month, COUNT(id) AS total")
.group("year, month, MONTH(created_at)")
.order("year DE
我有這個測試: require 'rails_helper'
require 'support/factory_girl'
RSpec.describe 'users/new', type: :view do
before(:each) do
assign(:user, create(:user))
end
it 'renders new user