allomov
1/30/2017 - 12:17 AM

test-mantra-in-irb.rb

require './spec/spec_helper'
require "rspec/mocks/standalone"

type = :filter
previous_transform = double()
manifest = YAML.load_file(assets_path("transforms", "manifest.yml"))
allow(previous_transform).to receive(:result) { Mantra::Manifest::Element.create(manifest) }
options = {"sections" => [ "releases" ]}
transform = Mantra::Transform.create(options.merge(type: type, previous_transform: previous_transform))
transform.run
y transform.result.to_ruby_object