diff --git a/app/views/questions/_numeric_question.html.erb b/app/views/questions/_numeric_question.html.erb new file mode 100644 index 000000000..f9aff6327 --- /dev/null +++ b/app/views/questions/_numeric_question.html.erb @@ -0,0 +1,4 @@ +
+ + +
\ No newline at end of file diff --git a/spec/views/questions/_numeric_question.html.erb_spec.rb b/spec/views/questions/_numeric_question.html.erb_spec.rb new file mode 100644 index 000000000..f1c03bd0d --- /dev/null +++ b/spec/views/questions/_numeric_question.html.erb_spec.rb @@ -0,0 +1,11 @@ +describe 'questions/_numeric_question.html.erb' do + context 'when given a label' do + let(:label) { "Test Label" } + + it 'displays a numeric entry field' do + render :partial => 'numeric_question', locals: { label: label } + expect(rendered).to have_selector('//input[@type="number"]') + expect(rendered).to have_selector("//label[contains('#{label}')]") + end + end +end \ No newline at end of file