Sha256: 51de176a5dec176440db405f5deeb112b23594510d5c4c109196b2cc3478bda8
Contents?: true
Size: 1.35 KB
Versions: 19
Compression:
Stored size: 1.35 KB
Contents
riml_include 'dsl.riml' class EqualityMatcherSpec defm describe return "EqualityMatcher" end defm it_can_check_equality_of_strings expect('foo').to_equal('foo') end defm it_can_check_inequality_of_strings expect('foo').to_not_equal('bar') end defm it_can_check_equality_of_numbers expect(1).to_equal(1) end defm it_can_check_inequality_of_numbers expect(1).to_not_equal(2) end defm it_can_check_equality_with_alias_eq expect('foo').to_eq('foo') end defm it_can_check_inequality_with_alias_neq expect('foo').to_neq('bar') end defm verify_type_mismatch(a, b) try expect(a).to_equal(b) caught_error = false catch /type mismatch/ ""get_logger().info(v:exception) caught_error = true end expect(caught_error).to_be_true() end defm it_can_report_type_mismatch self.verify_type_mismatch(100, 'one hundred') self.verify_type_mismatch(1, '1') self.verify_type_mismatch(0, '0') self.verify_type_mismatch({}, []) self.verify_type_mismatch({}, 'foo') end defm it_can_check_equality_of_lists expect(['a', 'b']).to_not_equal(['a', 'b', 'c']) expect(['a', 'b']).to_equal(['a', 'b']) end defm it_can_check_equality_of_dicts expect({'foo': 10}).to_not_equal({'bar': 20}) expect({'foo': { 'bar': 10 }}).to_equal({'foo': { 'bar': 10 }}) end end
Version data entries
19 entries across 19 versions & 1 rubygems