Permalink
Browse files

More spec cleanup

  • Loading branch information...
1 parent 0b500a8 commit 4a699f7d76a1891d542cda0760d0021b8b1ba8d9 @adrienthebo adrienthebo committed Dec 7, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 spec/unit/puppetx/filemapper_spec.rb
@@ -354,11 +354,6 @@ def select_file; '/single/file/provider'; end
resource.property(:dummy_property).value = 'zoom'
resource.property(:dummy_property).sync
end
-
- it 'should forward provider#flush to the class' do
- subject.expects(:flush_file).with('/multiple/file/provider-flush')
- resource.flush
- end
end
describe 'when flushing' do
@@ -370,6 +365,11 @@ def select_file; '/single/file/provider'; end
before { newtype.stubs(:backup) }
+ it 'should forward provider#flush to the class' do
+ subject.expects(:flush_file).with('/multiple/file/provider-flush')
+ resource.flush
+ end
+
it 'should generate filetypes for new files' do
subject.dirty_file!('/multiple/file/provider-flush')
@flattype.expects(:new).with('/multiple/file/provider-flush').returns newtype
@@ -401,7 +401,7 @@ def select_file; '/single/file/provider'; end
subject { multiple_file_provider }
before do
- subject.stubs(:format_file).returns %w{invalid data}
+ subject.stubs(:format_file).returns ['definitely', 'not', 'of', 'class', 'String']
subject.dirty_file!('/multiple/file/provider-flush')
end

0 comments on commit 4a699f7

Please sign in to comment.