Skip to content

Commit 58afc29

Browse files
committed
Add title to exercise in factory to match validation
- also removed forgotten print() statements in exercise specs (Closes #17)
1 parent 6012ae0 commit 58afc29

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/factories/exercise.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
end
77

88
factory :exercise_with_single_java_main_file, class: 'Exercise' do
9+
title 'Some Exercise'
10+
description 'Very descriptive'
911
after(:create) do |exercise|
1012
create(:single_java_main_file, exercise: exercise)
1113
end

spec/models/exercise_spec.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
}
1616

1717
it 'has single <p:description> tag which contains description' do
18-
print(xml)
1918
descriptions = xml.xpath('p:task/p:description/text()')
2019
expect(descriptions.size()).to be 1
2120
expect(descriptions[0].content).to eq 'Very descriptive'
@@ -70,7 +69,6 @@
7069
}
7170

7271
it 'has single /p:files/p:file tag' do
73-
print(xml)
7472
files = xml.xpath('p:task/p:files/p:file')
7573
expect(files.size()).to be 1
7674
end

0 commit comments

Comments
 (0)