Sha256: 8c660265acfdb3614e411eb51e2ffd47838650a735a23bdb8716c3690de05236
Contents?: true
Size: 487 Bytes
Versions: 1
Compression:
Stored size: 487 Bytes
Contents
module SmartRspec module Support module Expectations def assert_attr_type(attr, type, other) assert_type = type == :Boolean ? be_boolean : be_kind_of(Kernel.const_get(type)) expect(subject.send(attr)).to assert_type end def assert_validation(attr, value = nil, mock = nil) mock ||= subject mock.send("#{attr}=", value) expect(mock).not_to be_valid expect(mock).to have_error_on(attr) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
smart_rspec-0.0.1 | lib/smart_rspec/support/expectations.rb |