lib/setsuzoku/rspec/dynamic_spec_helper.rb in setsuzoku-0.10.4 vs lib/setsuzoku/rspec/dynamic_spec_helper.rb in setsuzoku-0.10.5

- old
+ new

@@ -65,16 +65,16 @@ # # @return void def stub_plugin_methods_for_spec(registering_class = self.described_class) plugin_class = registering_class.plugin_context[:plugin_class] plugin_class.spec_definitions.each do |action_name, spec| - plugin_class.any_instance.should_receive(action_name).and_return(spec[:stub][:response]) + plugin_class.any_instance.stub(action_name).and_return(spec[:stub][:response]) # a plugin spec might have some dynamic data, e.g. certain methods are called with plugin specific args. if spec[:stub][:dynamic_methods] spec[:stub][:dynamic_methods].each do |meth, resp| #how can we ignore the call count instead of just putting a high limit? - plugin_class.any_instance.should_receive(meth).and_return(resp) + plugin_class.any_instance.stub(meth).and_return(resp) end end end end # @@ -206,15 +206,15 @@ def define_stub_plugin_method(plugin_class, action_name, spec, always_stub = false) stub_plugin_method_name = :"stub_plugin_method_#{action_name}" define_method stub_plugin_method_name do #TODO: let this use the appropriate rspec instance stub method #TODO: Does it make sense to have the stub with the method? or should it be in a json file we parse? - plugin_class.any_instance.should_receive(action_name).and_return(spec[:stub][:response]) + plugin_class.any_instance.stub(action_name).and_return(spec[:stub][:response]) # a plugin spec might have some dynamic data, e.g. certain methods are called with plugin specific args. if spec[:stub][:dynamic_methods] spec[:stub][:dynamic_methods].each do |meth, resp| #how can we ignore the call count instead of just putting a high limit? - plugin_class.any_instance.should_receive(meth).and_return(resp) + plugin_class.any_instance.stub(meth).and_return(resp) end end end if always_stub before :each do \ No newline at end of file