On Dec 17, 2009, at 2:56 AM, Andrew Kaspick wrote: > The "test" method copied below complains when another test of the same > name if found in another test file. > > The following doesn't work... > > test/integration/users_test.rb > test "this is a test" do > ... > end > > test/integration/forums_test.rb > test "this is a test" do > ... > end > > but this does work... > > test/integration/users_test.rb > def this_is_a_test > ... > end > > test/integration/forums_test.rb > def this_is_a_test > ... > end > > What's the purpose for "test" working this way? >
I've run into the opposite situation, where I was writing vanilla "def test_" stuff and trying to debug a particular case. Unfortunately, *somebody* had copied the whole header / setup from another test, so the test method was stomping on an identically named test... I'd recommend that you double-check the declarations in users_test.rb and forums_test.rb, as something weird is going on... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
