I’ve created the twitter app and things looked fine, but then I ran into some problems with the spec
expect(tweet.text(.to match /#rails/i
Problem is it succeeds sometimes and fails others. I’ve loaded the app in the browser to see what gets returned and here’s what I think is happening:
The results include things that clearly having nothing to do with the hashtag #rails… it’s picking up any tweet that has the word ‘rails’ in it, including things like:
DELL POWEREDGE R710 2 x QUAD CORE E5540 2.53GHz 64GB RAM 2 x 1TB SATA
RAILS $1649.00 #server #computer http://t.co/mXdaHJfhHW
Could it be that the search was expecting to specify a hashtag but is instead just searching for the word?
All I had to do was change the matcher to /rails/i
EDIT: And now it occasionally fails with
expected css “li.tweet” to return something
when I run rake for the whole thing
EDIT2: And I’ve noticed that when I run the app in a browser, there are occasions when there is no response; only what was previously displayed remains on screen.
EDIT3: In fact, even with the hashtag taken out of the matcher, it still fails occasionally:
expected "\n Gettin some finances together (@ PNC Bank)
http://t.co/lplBBNu1Gi\n " to match /rails/i