spec/facemock/config_spec.rb in facemock-0.0.9 vs spec/facemock/config_spec.rb in facemock-0.0.10

- old
+ new

@@ -173,9 +173,23 @@ user_count = yaml_load_data.inject(0){|count, data| count += data[:users].size } Facemock::Config.load_users(@path) expect(Facemock::Application.all.count).to eq app_count expect(Facemock::User.all.count).to eq user_count end + + context 'when already exist specified users' do + before do + Facemock::Config.load_users(@path) + end + + it 'should not raise error' do + size = Facemock::User.all.size + expect(size).to eq 3 + path = create_temporary_yaml_file(yaml_load_data) + Facemock::Config.load_users(path) + expect(size).to eq 3 + end + end end end end end