summaryrefslogtreecommitdiff
path: root/spec/models/issue_spec.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-08-10 18:07:50 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-08-10 18:25:15 -0400
commit775418918782d5284000ed0bfea364458c748567 (patch)
treec31e3633a3bcbed17b000f0165cf35edad41f7ca /spec/models/issue_spec.rb
parent1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff)
downloadgitlab-ce-775418918782d5284000ed0bfea364458c748567.tar.gz
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
Diffstat (limited to 'spec/models/issue_spec.rb')
-rw-r--r--spec/models/issue_spec.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb
index 806b8ee74e0..e9cbd72589a 100644
--- a/spec/models/issue_spec.rb
+++ b/spec/models/issue_spec.rb
@@ -20,9 +20,9 @@ describe Issue do
end
subject { Factory.create(:issue,
- :author => Factory(:user),
- :assignee => Factory(:user),
- :project => Factory.create(:project)) }
+ author: Factory(:user),
+ assignee: Factory(:user),
+ project: Factory.create(:project)) }
it { should be_valid }
describe '#is_being_reassigned?' do
@@ -42,10 +42,10 @@ describe Issue do
end
it 'returns false if the closed attribute has changed and is now false' do
issue = Factory.create(:issue,
- :closed => true,
- :author => Factory(:user),
- :assignee => Factory(:user),
- :project => Factory.create(:project))
+ closed: true,
+ author: Factory(:user),
+ assignee: Factory(:user),
+ project: Factory.create(:project))
issue.closed = false
issue.is_being_closed?.should be_false
end
@@ -58,10 +58,10 @@ describe Issue do
describe '#is_being_reopened?' do
it 'returns true if the closed attribute has changed and is now false' do
issue = Factory.create(:issue,
- :closed => true,
- :author => Factory(:user),
- :assignee => Factory(:user),
- :project => Factory.create(:project))
+ closed: true,
+ author: Factory(:user),
+ assignee: Factory(:user),
+ project: Factory.create(:project))
issue.closed = false
issue.is_being_reopened?.should be_true
end
@@ -78,9 +78,9 @@ describe Issue do
let(:project) { Factory(:project) }
subject {
Factory.create(:issue,
- :author => Factory(:user),
- :assignee => Factory(:user),
- :project => project)
+ author: Factory(:user),
+ assignee: Factory(:user),
+ project: project)
}
it "with no notes has a 0/0 score" do
@@ -107,8 +107,8 @@ describe Issue do
end
describe ".search" do
- let!(:issue) { Factory.create(:issue, :title => "Searchable issue",
- :project => Factory.create(:project)) }
+ let!(:issue) { Factory.create(:issue, title: "Searchable issue",
+ project: Factory.create(:project)) }
it "matches by title" do
Issue.search('able').all.should == [issue]