blob: d9b29fa213b6758f56b5702bd573f4b101f09a0f (
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::FileValidator, :type => :model do
subject { Chouette::FileValidator.new("public") }
before(:each) do
allow(subject).to receive_messages :execute! => true
end
describe "#validate" 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 -inputFile option" do
expect(chouette_command).to receive(:run!).with(hash_including(:input_file => File.expand_path('file')))
subject.validate "file"
end
end
end
|