Skip to content

Instantly share code, notes, and snippets.

@techno-tanoC
Created September 17, 2017 00:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techno-tanoC/6ce381f56236b1086763cf9e59007f6c to your computer and use it in GitHub Desktop.
Save techno-tanoC/6ce381f56236b1086763cf9e59007f6c to your computer and use it in GitHub Desktop.
module RSpecHelper
def leads
if block_given?
subject
expect(yield)
else
expect { subject }
end
end
end
@ndac-todoroki
Copy link

ndac-todoroki commented Jun 15, 2019

これじゃいかんのか

subject { db.create }
it { expect {subject}.to change { db.count }.from(0).to(1) }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment