Sha256: f80e511da4e76e0e02cb468204ca4a29e0b15b72024b9935462f218eec0c344d
Contents?: true
Size: 1.33 KB
Versions: 5
Compression:
Stored size: 1.33 KB
Contents
{ //// // NOTE: `.code-snippets` files support only C-style comments. // NOTE: More information about VS Code Snippets can be found here: // - https://code.visualstudio.com/docs/editor/userdefinedsnippets // "comparison RSpec example group": { "scope": "ruby", "prefix": "comparison", "body": [ "example_group \"comparison\" do", " describe \"#==\" do", " context \"when `other` have different class\" do", " let(:other) { 42 }", "", " it \"returns `nil`\" do", " expect(${1:entity} == other).to be_nil", " end", " end", "", " context \"when `other` have different ${2:attribute}\" do", " let(:other) { described_class.new(${2:attribute}: other_${2:attribute}) }", "", " it \"returns `false`\" do", " expect(${1:entity} == other).to eq(false)", " end", " end", "", " context \"when `other` has same attributes\" do", " let(:other) { described_class.new }", "", " it \"returns `true`\" do", " expect(${1:entity} == other).to eq(true)", " end", " end", " end", "end", ], "description": "`comparison` - an example group for RSpec to verify `#==`, `#===`, `#equal?`, `#eql?` methods" } }
Version data entries
5 entries across 5 versions & 1 rubygems