spec/rspec/block_support_spec.rb in surrogate-0.5.5 vs spec/rspec/block_support_spec.rb in surrogate-0.6.0

- old
+ new

@@ -1,11 +1,11 @@ require 'spec_helper' # these all need error messages describe 'RSpec matchers', 'have_been_told_to(...).with { |block| }' do - let(:dir) { Surrogate.endow(Class.new) { define(:chdir) { nil }}} + let(:dir) { Surrogate.endow(Class.new) { define(:chdir) { |dir_path| nil }}} let(:dir_path) { '/some/dir/path' } it 'fails if no submitted_blocks were found' do dir.should_not have_been_told_to(:chdir).with(dir_path) { |block| block.before { raise 'this should not be executed' } @@ -55,10 +55,10 @@ } end end - let(:file) { Surrogate.endow(Class.new) { define(:write) { true }}} + let(:file) { Surrogate.endow(Class.new) { define(:write) { |name, body| true }}} let(:file_name) { 'some_file_name.ext' } let(:file_body) { 'some file body' } describe 'the .before and .after hooks' do specify "take blocks which it will evaluate before/after invoking the submitted_block" do