From dee52393b5b76c5d30addbfe7ba43e718b67a371 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 16 Apr 2015 16:25:25 -0400 Subject: Correct usage of `subject` in specs --- spec/models/commit_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spec/models/commit_spec.rb') diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index 11cc7762ce4..2cc23efb986 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -69,8 +69,9 @@ eos end it_behaves_like 'a mentionable' do - let(:subject) { commit } let(:mauthor) { create :user, email: commit.author_email } + subject { commit } + let(:backref_text) { "commit #{subject.id}" } let(:set_mentionable_text) { ->(txt){ subject.stub(safe_message: txt) } } -- cgit v1.2.1 From 8c9a148720121506151ab9697e29b67dd4c11ed4 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 16 Apr 2015 16:26:28 -0400 Subject: Update mentionable shared examples to be (a bit) more understandable --- spec/models/commit_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/models/commit_spec.rb') diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index 2cc23efb986..506bc3339b6 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -69,9 +69,9 @@ eos end it_behaves_like 'a mentionable' do - let(:mauthor) { create :user, email: commit.author_email } subject { commit } + let(:author) { create(:user, email: commit.author_email) } let(:backref_text) { "commit #{subject.id}" } let(:set_mentionable_text) { ->(txt){ subject.stub(safe_message: txt) } } -- cgit v1.2.1