blob: 8bcd147616b2b37938adfc352a08820d84630e6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
require 'spec_helper'
describe Chouette::Exporter, :type => :model do
subject { Chouette::Exporter.new("test") }
describe "#export" do
let(:chouette_command) { double :run! => true }
before(:each) do
allow(subject).to receive_messages :chouette_command => chouette_command
end
it "should use specified file in -outputFile option" do
expect(chouette_command).to receive(:run!).with(hash_including(:output_file => File.expand_path('file')))
subject.export "file"
end
it "should use specified format in -format option" do
expect(chouette_command).to receive(:run!).with(hash_including(:format => 'DUMMY'))
subject.export "file", :format => "dummy"
end
end
end
|