This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test$ ruby feed_aggregator_test.rb | |
| Run options: | |
| # Running tests: | |
| E. | |
| Finished tests in 0.251661s, 7.9472 tests/s, 7.9472 assertions/s. | |
| 1) Error: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'sinatra' | |
| def parse | |
| end | |
| get '/' do | |
| "Feed Aggregator" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test$ ruby feed_aggregator_test.rb | |
| Run options: | |
| # Running tests: | |
| E. | |
| Finished tests in 0.025705s, 77.8059 tests/s, 77.8059 assertions/s. | |
| 1) Error: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def test_find_the_link | |
| feed = File.read('fixtures/feed.xml') | |
| items = parse feed | |
| item = items.first | |
| link = 'http://www.flickr.com/photos/mattcaustin/8205498382/in/pool-1373979@N22' | |
| assert_equal item[:link], link | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <rss version="2.0" | |
| xmlns:media="http://search.yahoo.com/mrss/" | |
| xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| xmlns:creativeCommons="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html" | |
| xmlns:flickr="urn:flickr:user" > | |
| <channel> | |
| <title>Flickr's Best Sunsets Pool</title> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test$ ruby feed_aggregator_test.rb | |
| Loaded suite feed_aggregator_test | |
| Started | |
| . | |
| Finished in 0.063198 seconds. | |
| 1 tests, 2 assertions, 0 failures, 0 errors, 0 skips |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'sinatra' | |
| get '/' do | |
| "Feed Aggregator" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test$ ruby feed_aggregator_test.rb | |
| Loaded suite feed_aggregator_test | |
| Started | |
| E | |
| Finished in 0.001054 seconds. | |
| 1) Error: | |
| test_it_says_feed_aggregator(FeedAggregatorTest): | |
| NameError: uninitialized constant FeedAggregatorTest::Sinatra | |
| feed_aggregator_test.rb:11:in `app' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test$ ruby feed_aggregator_test.rb | |
| <internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- ../main (LoadError) | |
| from <internal:lib/rubygems/custom_require>:29:in `require' | |
| from feed_aggregator_test.rb:1:in `<main>' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require '../main' | |
| require 'test/unit' | |
| require 'rack/test' | |
| ENV['RACK_ENV'] = 'test' | |
| class FeedAggregatorTest < Test::Unit::TestCase | |
| include Rack::Test::Methods | |
| def app |