I've figured out how to associate the different testtask with different rake task. The trick is adding a task name while creating a new testtask. Like this,
Rake::TestTask.new(:default) do |t|
t.test_files = FileList['test/test_*.rb']
end
Rake::TestTask.new(:internet) do |t|
t.test_files = FileList['test/itest_*.rb']
end
desc "No internet connection required"
task :default => :test
desc "Needs internet connection"
task :internet => :test
So rake internet
will just run the test cases that need internet connections.