docbrown/spec/models/tweet_spec.rb
Mac Siri 40f488d991 Migrate to Travis CI (part 2) (#591)
* Update Travis.yml

* Update README

* Update README

* Adjust test to not rely on env vars

* Update encryption

* Refactor

* Update env key

* Stub AWS calls

* Create ApplicationConfig

* Fix specs

* Fix lint

* Update ApplicationConfig

* Remove travis env vars

* Fix lint

* Extend character limit to 100

* Add env to travis

* Take out auto-restart after deploy

* Immediately discarded test cache

* Stub GA in request specs

* Stub Pusher

* Fix broken specs

* Update fixture

* Add CodeClimate id

* Change CodeClimate key

* Remove merge mistakes

* WIP

* Add Envied gem & Change README

* Add missing keys

* Add missing key

* Update fixture

* Fix broken spec

* Add Slack Notification for Travis

* Fix wording

* Fix typo
2018-07-20 20:17:18 -04:00

20 lines
445 B
Ruby

require "rails_helper"
vcr_option = {
cassette_name: "twitter_gem",
allow_playback_repeats: "true",
}
RSpec.describe Tweet, type: :model, vcr: vcr_option do
let(:tweet_id) { "1018911886862057472" }
it "fetches a tweet" do
tweet = Tweet.fetch(tweet_id)
expect(tweet.class).to eq(described_class)
end
it "renders processed text" do
tweet = Tweet.fetch(tweet_id)
expect(tweet.processed_text).not_to be_nil
end
end