It's infuriating not being able to understand. I feel like I'm being played for a fool or something.

So today I went to go up to this girl in the cafeteria and started talking to her. Just her at the table. And she is in one of my classes. we talk about school, greek life, other stuff. She even asks me what my plans are this weekend. From my experience she is showing a lot of interest. She even stays to talk to me after she is clearly done eating. Before she is about to leave (she had to go see a friend) I say "If you have any free time would you like to hang out?" She says "umm sure". I respond "Why the hesitation?" She says she has a boyfriend. And I say "Oh, okay.. We'll just be classmates then". I then say our goodbyes. The whole conversation I speak in a nonchalant, non caring kind of way. So I don't seem too invested.

What is the deal? Does she really have a boyfriend? Should I pursue anyways? Is that what she is hoping for? Was it a test?

Thank you all for taking the time to read this. I hope I was being clear. I'm not mad at this specific incident.. I just don't know how to feel or say when I get hit with "I have a boyfriend", more especially when the girl is showing interest.

EDIT: Thank you for all that replied.. Really didn't expect to get this many responds. But it seems a lot of people were wondering about this as well. Is it a Sht test? IDK, but it sucks that we live in a world where girls like to play mind games. Makes dating a lot trickier. Maybe it was a Sht test or maybe she just wanted to be friends. I will try Jigsus's "Does he let you speak to other guys?"

or

"Wow! Thank you for your honesty! I'd still like to see you though."

Everybody else had good responses as well. Thank you for your time. Much Appreciated.