Skip to content
Permalink
Browse files

Delegating to Arel is removed

Also this now checks the SQL is valid, the spec itself isn't great but
specing scopes is similar to specing SQL...
  • Loading branch information
nikolai-b committed Nov 25, 2019
1 parent 28441e0 commit 99bd437539587f0357da97ee86a964f3db761ace
Showing with 3 additions and 1 deletion.
  1. +3 −1 spec/models/issue_spec.rb
@@ -360,8 +360,10 @@

context "scopes" do
describe "by_most_recent" do
let!(:issue) { create :issue }

it "should set the order to be by created_at descending" do
expect(Issue.by_most_recent.orders.first).to eq("created_at DESC")
expect(Issue.by_most_recent.first).to eq(issue)
end
end

0 comments on commit 99bd437

Please sign in to comment.
You can’t perform that action at this time.