diff options
| author | mo <mo.khan@gmail.com> | 2017-09-24 12:56:20 -0600 |
|---|---|---|
| committer | mo <mo.khan@gmail.com> | 2017-09-24 12:56:20 -0600 |
| commit | a67e0cb103f76df6095257857e5f980340f3c940 (patch) | |
| tree | 7602d8e3f1c2bb721afaf4d891c1e3800c7166c6 /spec | |
| parent | 96d66bcdb7bad43c3ec08349d2d978aec307ec90 (diff) | |
upgrade to rails 5.1
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/jobs/publish_to_twitter_job_spec.rb | 2 | ||||
| -rw-r--r-- | spec/models/creation_spec.rb | 13 | ||||
| -rw-r--r-- | spec/models/photo_spec.rb | 5 |
3 files changed, 7 insertions, 13 deletions
diff --git a/spec/jobs/publish_to_twitter_job_spec.rb b/spec/jobs/publish_to_twitter_job_spec.rb index 59391043..fdb830e2 100644 --- a/spec/jobs/publish_to_twitter_job_spec.rb +++ b/spec/jobs/publish_to_twitter_job_spec.rb @@ -20,7 +20,7 @@ RSpec.describe PublishToTwitterJob, :type => :job do it "tweets about the new cake" do subject.perform(cake) expect(twitter).to have_received(:tweet). - with("yummy By joe on http://www.blah.com/cakes/88-yummy!") + with("yummy By joe on http://www.example.com/cakes/88-yummy!") end end diff --git a/spec/models/creation_spec.rb b/spec/models/creation_spec.rb index 4a900b68..080a83a7 100644 --- a/spec/models/creation_spec.rb +++ b/spec/models/creation_spec.rb @@ -1,23 +1,14 @@ require 'rails_helper' describe Creation do - subject { Creation.new } - - describe "should be able to set attributes" do - it "should save name" do - subject.name="HELLO WORLD" - subject.category = create(:category) - subject.save! - expect(Creation.find(subject.id).name).to eql("HELLO WORLD") - end - end + subject { build(:creation) } describe "#liked_by" do let(:user) { create(:user) } let(:creation) { create(:creation) } context "when the user already likes the creation" do - let!(:favorite) { creation.favorites.create(:user => user) } + let!(:favorite) { creation.favorites.create(user: user) } let(:result) { creation.liked_by(user) } it "returns the existing favorite" do diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index 46c39797..efef657f 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -85,7 +85,10 @@ describe Photo do end def path_to(image_filename) - ActionController::Base.helpers.asset_path(image_filename) + ActionController::Base.helpers.asset_path( + image_filename, + skip_pipeline: true + ) end end end |
