Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandx <dmitriy.zaporozhets@gmail.com>2012-10-17 23:35:08 +0400
committerrandx <dmitriy.zaporozhets@gmail.com>2012-10-17 23:35:08 +0400
commitdb469ea3e69f03f5c1966958041bca91a04686ce (patch)
tree7e09fc265908ac4e0e290a80141109129fc5b6e3 /spec/models
parente0c43c46ddd7f9488ef076e0c91800e43bd376b3 (diff)
Fixing broken test of project last_activity
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/project_spec.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index f78ce86b266..6fe46446262 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -167,29 +167,29 @@ describe Project do
end
end
- describe "last_activity" do
+ describe "last_activity methods" do
let(:project) { Factory :project }
+ let(:last_event) { double(created_at: Time.now) }
- before do
- project.stub(last_event: double)
+ describe "last_activity" do
+ it "should alias last_activity to last_event"do
+ project.stub(last_event: last_event)
+ project.last_activity.should == last_event
+ end
end
- it { project.last_activity.should == last_event }
- end
-
- describe 'last_activity_date' do
- let(:project) { Factory :project }
-
- it 'returns the creation date of the project\'s last event if present' do
- last_event = double(created_at: Time.now)
- project.stub(last_event: last_event)
- project.last_activity_date.should == last_event.created_at
- end
+ describe 'last_activity_date' do
+ it 'returns the creation date of the project\'s last event if present' do
+ project.stub(last_event: last_event)
+ project.last_activity_date.should == last_event.created_at
+ end
- it 'returns the project\'s last update date if it has no events' do
- project.last_activity_date.should == project.updated_at
+ it 'returns the project\'s last update date if it has no events' do
+ project.last_activity_date.should == project.updated_at
+ end
end
end
+
describe "fresh commits" do
let(:project) { Factory :project }