Skip to content

Instantly share code, notes, and snippets.

@PharaohKJ
Created January 25, 2016 00:41
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 PharaohKJ/9b49fa5bd7df5b624680 to your computer and use it in GitHub Desktop.
Save PharaohKJ/9b49fa5bd7df5b624680 to your computer and use it in GitHub Desktop.
rspecでboolean値をテストする
RSpec::Matchers.define :be_boolean do
match do |actual|
expect(actual).to satisfy { |x| x == true || x == false }
end
end
it 'is boolean' do
expect(true).to be_boolean
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment