spec/unit/lib/web/section_dsl_spec.rb in howitzer-2.0.1 vs spec/unit/lib/web/section_dsl_spec.rb in howitzer-2.0.2

- old
+ new

@@ -146,12 +146,12 @@ context 'checking nested level' do let(:context2) { double } let(:context3) { double } let(:capybara_element) { double } before do - expect(session).to receive(:find).with(*finder_args).once { context2 } - expect(context2).to receive(:find).with('#klass') { context3 } - expect(context3).to receive(:find).with(:xpath, './/a') { capybara_element } + expect(session).to receive(:find).with(*finder_args).once.and_return(context2) + expect(context2).to receive(:find).with('#klass').and_return(context3) + expect(context3).to receive(:find).with(:xpath, './/a').and_return(capybara_element) end it 'can work with nested section' do nested_section = web_page_class.new.name1_section.name2_section expect(nested_section).to be_a(section_class)