Sha256: 3aa7869fa1a7352bc9a5612ae48c98c3baa3adea00658d1e0f1693bf3cd86251
Contents?: true
Size: 812 Bytes
Versions: 3
Compression:
Stored size: 812 Bytes
Contents
require 'test_helper' describe 'any? all? and none?' do let(:order) { Order.new } def setup reset_order Order.add_to_flags a: 1, b: 7, c: 3 end it 'checks any?' do order.a = true assert order.flags_any?(:a, :b) order.a = false refute order.flags_any?(:a, :b) end it 'checks any? #2' do order.b = true assert order.flags_any?(:a, :b) order.b = false refute order.flags_any?(:a, :b) end it 'checks all?' do order.a = order.b = true assert order.flags_all?(:a, :b) order.a = false refute order.flags_all?(:a, :b) end it 'checks none? #2' do order.a = order.b = true refute order.flags_none?(:a, :b) order.a = false refute order.flags_none?(:a, :b) order.b = false assert order.flags_none?(:a, :b) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
act_with_flags-0.0.7 | test/any_all_none_test.rb |
act_with_flags-0.0.6 | test/any_all_none_test.rb |
act_with_flags-0.0.4 | test/any_all_none_test.rb |