Skip to content

Commit

Permalink
Remove RSpec hack (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlarraz committed Jun 4, 2021
1 parent dbca72b commit 39450d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@
con = connection.slave_pool.connections.first
expect(con).to receive(:exec_query) do |query|
expect(query).to match(/SELECT\s+1\s*(AS one)?\s+FROM .?users.?\s+LIMIT\s+.?1/)
end.once.
# and_call_original # Switch back to this once https://github.com/rspec/rspec-mocks/pull/1385 is released
and_wrap_original { |m, *args| m.call(*args.first(3)) }
end.once.and_call_original

Test::User.exists?
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@

expect(con).to receive(:exec_query) do |query|
expect(query).to match(/SELECT\s+1\s*(AS one)?\s+FROM .?users.?\s+LIMIT\s+.?1/)
end.once.
# and_call_original # Switch back to this once https://github.com/rspec/rspec-mocks/pull/1385 is released
and_wrap_original { |m, *args| m.call(*args.first(3)) }
end.once.and_call_original

Test::User.exists?
end
Expand Down

0 comments on commit 39450d7

Please sign in to comment.