Sha256: 9cbba4cbd04498ec011cafc512a1786d7f2447cdaa391421738ad3fadf98edd8

Contents?: true

Size: 690 Bytes

Versions: 3

Compression:

Stored size: 690 Bytes

Contents

require 'spec_helper'

describe Chouette::Exporter do

  subject { Chouette::Exporter.new("test") }

  describe "#export" do

    let(:chouette_command) { mock :run! => true }

    before(:each) do
      subject.stub :chouette_command => chouette_command
    end

    it "should use specified file in -outputFile option" do
      chouette_command.should_receive(:run!).with(hash_including(:output_file => File.expand_path('file')))
      subject.export "file"
    end
    
    it "should use specified format in -format option" do
      chouette_command.should_receive(:run!).with(hash_including(:format => 'DUMMY'))
      subject.export "file", :format => "dummy"
    end
    
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ninoxe-0.1.6 spec/models/chouette/exporter_spec.rb
ninoxe-0.1.3 spec/models/chouette/exporter_spec.rb
ninoxe-0.1.2 spec/models/chouette/exporter_spec.rb