Sha256: 2600fbd7f25f7da25a96e1598fb395355e31f6932b0b83ec1d6fe48bf769ba40
Contents?: true
Size: 927 Bytes
Versions: 11
Compression:
Stored size: 927 Bytes
Contents
require 'spec_helper' describe "What's said in README" do let(:input) { JSON.parse(<<~JSON) [ { "status": "open", "body": " Hello world" }, { "status": "closed", "body": " Foo bar baz" } ] JSON } let(:lens) { Monolens.load_yaml(<<~YML) --- version: 1.0 lenses: - array.map: - object.transform: defn: status: - str.upcase body: - str.strip - object.rename: defn: body: description YML } let(:expected) { JSON.parse(<<~JSON) [ { "status": "OPEN", "description": "Hello world" }, { "status": "CLOSED", "description": "Foo bar baz" } ] JSON } it 'works' do expect(lens.call(input)).to eql(expected) end end
Version data entries
11 entries across 11 versions & 1 rubygems