Sha256: 612946ef0c29c4a39dab02c133b6302d6795981666882fbed473971f595c7cfd
Contents?: true
Size: 759 Bytes
Versions: 3
Compression:
Stored size: 759 Bytes
Contents
# encoding: utf-8 require 'spec_helper' module BusinessCatalyst::CSV describe Transformer do subject { Transformer.new("input") } describe "#transform" do it "raises NotImplementedError" do expect { subject.transform }.to raise_error(NotImplementedError) end end describe "Transformer.transform(input)" do it "creates a new instance with input" do Transformer.should_receive(:new).with("input").and_return(double("Transformer").as_null_object) Transformer.transform("input") end it "calls transform on the instance" do Transformer.any_instance.should_receive(:transform).and_return(:output) Transformer.transform(:input).should eq(:output) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems