Sha256: f56b2acf154f7e258463087c3b6145025e4ebbd6f0b4f59ce8390976e32089a8

Contents?: true

Size: 598 Bytes

Versions: 12

Compression:

Stored size: 598 Bytes

Contents

module Macros

  def fixture_file(file_name)
    File.open("spec/support/fixtures/#{file_name}")
  end

  # Stub Feedzirra response with stored fixture file content.
  # This is a workaround because VCR doesn't support Feedzirra yet.
  # File contents cannot be obtained from Safari because it translates
  # it into HTML. Use Firefox to get original raw source.
  def stub_feed(file_name)
    Curl::Easy.expects(:new).never
    file_content = fixture_file(file_name).read
    feed = Feedzirra::Parser::RSS.parse(file_content)
    Feedzirra::Feed.expects(:fetch_and_parse).returns(feed)
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
fandango-0.2.1 spec/support/macros.rb
fandango-0.2.0 spec/support/macros.rb
fandango-0.1.9 spec/support/macros.rb
fandango-0.1.8 spec/support/macros.rb
fandango-0.1.7 spec/support/macros.rb
fandango-0.1.6 spec/support/macros.rb
fandango-0.1.5 spec/support/macros.rb
fandango-0.1.4 spec/support/macros.rb
fandango-0.1.3 spec/support/macros.rb
fandango-0.1.2 spec/support/macros.rb
fandango-0.1.1 spec/support/macros.rb
fandango-0.1.0 spec/support/macros.rb