title: Rspec-Rails: Testing a method with a lot of combinations of arguments
body: <p>I have a method that I want to test for different paramters if it does the right thing. 
  What I am doing right now is </p>
  
  <pre><code>    def test_method_with(arg1, arg2, match)
          it "method should #{match.inspect} when arg2 = '#{arg2}'" do
                  method(arg1, FIXEDARG, arg2).should == match
          end
      end
      context "method with no info in arg1" do
          before (:each) do
              @ex_string = "no info"
          end
          test_method_with(@ex_string, "foo").should == "res1"}
          test_method_with(@ex_string, "bar").should == "res1"}
          test_method_with(@ex_string, "foobar").should == "res1"}
          test_method_with(@ex_string, "foobar2").should == "res2"}
          test_method_with(@ex_string, "barbar").should == "res2"}
          test_method_with(@ex_string, nil).should == nil}
      end
  </code></pre>
  
  <p>But this is really not so DRY to repeat the method over and over again... What would be a better way to accomplish this? More in the way the "table" option of cucumber does it (it is just about the right behaviour of a helper method, so to use cucumber does not seem right).</p>